[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dart-mode 905ce53 117/192: Fix a bunch of byte-compilation
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dart-mode 905ce53 117/192: Fix a bunch of byte-compilation warnings |
Date: |
Sun, 29 Aug 2021 11:02:02 -0400 (EDT) |
branch: elpa/dart-mode
commit 905ce53d1a71f7eda0791bde0e8457b4eb0813c3
Author: Natalie Weizenbaum <nex342@gmail.com>
Commit: Natalie Weizenbaum <nex342@gmail.com>
Fix a bunch of byte-compilation warnings
Closes #43
---
dart-mode.el | 43 +++++++++++++++++++++----------------------
1 file changed, 21 insertions(+), 22 deletions(-)
diff --git a/dart-mode.el b/dart-mode.el
index cf78588..041ffa7 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -2,7 +2,7 @@
;; Author: Natalie Weizenbaum
;; URL: https://github.com/nex3/dart-mode
-;; Version: 1.0.0
+;; Version: 1.0.1
;; Package-Requires: ((emacs "24.5") (cl-lib "0.5") (dash "2.10.0") (flycheck
"0.23") (s "1.11"))
;; Keywords: language
@@ -131,6 +131,10 @@ true for positions before the start of the statement, but
on its line."
((?} ?\;) t)
((?{) (dart-in-block-p (c-guess-basic-syntax))))))))
+(defconst dart--identifier-re
+ "[a-zA-Z_$][a-zA-Z0-9_$]*"
+ "A regular expression that matches keywords.")
+
(defun dart--forward-identifier ()
"Moves the point forward through a Dart identifier."
(when (looking-at dart--identifier-re)
@@ -215,13 +219,13 @@ Returns the value of the last form in BODY."
Returns (STDOUT STDERR EXIT-CODE)."
(dart--with-temp-file stderr-file
(with-temp-buffer
- (setq exit-code
- (apply #'call-process
- executable nil (list t stderr-file) nil args))
- (list
- (buffer-string)
- (dart--read-file stderr-file)
- exit-code))))
+ (-let [exit-code
+ (apply #'call-process
+ executable nil (list t stderr-file) nil args)]
+ (list
+ (buffer-string)
+ (dart--read-file stderr-file)
+ exit-code)))))
(defun dart--try-process (executable &rest args)
"Like `dart--run-process', but only returns stdout.
@@ -231,6 +235,12 @@ Any stderr is logged using dart-log. Returns nil if the
exit code is non-0."
(dart-log (format "Error running %S:\n%s" (cons executable args) (nth 1
result))))
(if (eq (nth 2 result) 0) (nth 0 result))))
+(defvar dart--do-it-again-callback nil
+ "A callback to call when `dart-do-it-again' is invoked.
+
+Only set in `dart-popup-mode'.")
+(make-variable-buffer-local 'dart--do-it-again-callback)
+
;;; General configuration
@@ -719,12 +729,12 @@ navigation, and more."
"The instance of the Dart analysis server we are communicating with.")
(defun dart--analysis-server-snapshot-path ()
+ "The absolute path to the snapshot file that runs the Dart analysis server."
(when dart-sdk-path
(concat dart-sdk-path
(file-name-as-directory "bin")
(file-name-as-directory "snapshots")
- "analysis_server.dart.snapshot"))
- "The absolute path to the snapshot file that runs the Dart analysis server.")
+ "analysis_server.dart.snapshot")))
(defvar dart-analysis-roots nil
"The list of analysis roots that are known to the analysis server.
@@ -1104,10 +1114,6 @@ minibuffer."
'words)
"A regular expression that matches keywords.")
-(defconst dart--identifier-re
- "[a-zA-Z_$][a-zA-Z0-9_$]*"
- "A regular expression that matches keywords.")
-
(defun dart--highlight-description (description)
"Returns a highlighted copy of DESCRIPTION."
(with-temp-buffer
@@ -1162,7 +1168,7 @@ minibuffer."
;; Cut off long dartdocs so that the full signature is always visible.
(when truncate
- (goto-line 11)
+ (forward-line 11)
(delete-region (- (point) 1) (point-max)))
(goto-char (point-min))
@@ -1515,7 +1521,6 @@ This will select the first parameter, if one exists."
(setq dart--last-expand-parameters-index 0)
(dart--json-let (elt dart--last-expand-results dart--last-expand-index)
((parameter-names parameterNames)
- (parameter-types parameterTypes)
(argument-string defaultArgumentListString)
(argument-ranges defaultArgumentListTextRanges))
(unless parameter-names (return-from dart-expand-parameters))
@@ -1603,12 +1608,6 @@ Also removes this function from `post-command-hook'."
(put 'dart-popup-mode 'mode-class 'special)
-(defvar dart--do-it-again-callback nil
- "A callback to call when `dart-do-it-again' is invoked.
-
-Only set in `dart-popup-mode'.")
-(make-variable-buffer-local 'dart--do-it-again-callback)
-
(defvar dart-popup-mode-map (make-sparse-keymap)
"Keymap used in Dart popup buffers.")
(set-keymap-parent dart-popup-mode-map help-mode-map)
- [nongnu] elpa/dart-mode 1c9da5a 087/192: Explicitly load compile.el so that the compilation-error-regexp-* variables are defined (#41), (continued)
- [nongnu] elpa/dart-mode 1c9da5a 087/192: Explicitly load compile.el so that the compilation-error-regexp-* variables are defined (#41), ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode eea1000 093/192: Highlight hover dartdoc, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 907cba5 095/192: Indicate deprecated hovers, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 8e09b68 120/192: Exclusively use cl-lib to avoid byte-compilation inconsistencies, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1249417 108/192: Better handle zero-argument functions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 0277dad 107/192: Include parameter documentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 73d0ebc 135/192: Merge branch 'refactor-tests', ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 4feac34 123/192: Make sure to provide the full buffer in dart-add-analysis-overlay, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode e01234a 113/192: Use funcall rather than apply where appropriate, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode eba375b 112/192: Parse JSON arrays as lists, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 905ce53 117/192: Fix a bunch of byte-compilation warnings,
ELPA Syncer <=
- [nongnu] elpa/dart-mode 25a0b8a 128/192: Add tests for dart-format, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode d1a0c5e 103/192: Fall back to normal expansion, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 613b311 111/192: Stop using lexical let, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 950d3a8 133/192: Add emacs versions 24.3 and snapshot, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode a4126bd 121/192: Allow s 1.10, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 52034c7 110/192: Add a dart--get helper to make it easier to use JSON, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode f3a7c7b 122/192: Properly tell flycheck when there are no errors, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1153c53 134/192: Add ert-runner, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 2a95005 159/192: Fix typo in README, regarding M-/ fallback, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode c30eaa9 140/192: Specify path to the dart-sdk inside of flutter, ELPA Syncer, 2021/08/29