emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/dart-mode 1b01681 065/192: Merge pull request #14 from hte


From: ELPA Syncer
Subject: [nongnu] elpa/dart-mode 1b01681 065/192: Merge pull request #14 from hterkelsen/issue13
Date: Sun, 29 Aug 2021 11:01:51 -0400 (EDT)

branch: elpa/dart-mode
commit 1b016810f507a3c8f0b7326b1d76284f227b8543
Merge: 147f554 aba5eed
Author: Natalie Weizenbaum <nex342@gmail.com>
Commit: Natalie Weizenbaum <nex342@gmail.com>

    Merge pull request #14 from hterkelsen/issue13
    
    'dart' must be found to find the analysis server snapshot
---
 dart-mode.el | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/dart-mode.el b/dart-mode.el
index c578fb5..a4e2f18 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -621,9 +621,10 @@ navigation, and more."
   :package-version '(dart-mode . "0.12"))
 
 (defcustom dart-analysis-server-snapshot-path
-  (concat (file-name-directory dart-executable-path)
-          (file-name-as-directory "snapshots")
-          "analysis_server.dart.snapshot")
+  (when dart-executable-path
+    (concat (file-name-directory dart-executable-path)
+            (file-name-as-directory "snapshots")
+            "analysis_server.dart.snapshot"))
   "The absolute path to the snapshot file that runs the Dart analysis server."
   :group 'dart-mode
   :type 'file
@@ -962,7 +963,11 @@ Key bindings:
   (c-common-init 'dart-mode)
   (c-set-style "dart")
   (when dart-enable-analysis-server
-      (dart--start-analysis-server-for-current-buffer))
+    (if (or (null dart-executable-path)
+            (null dart-analysis-server-snapshot-path))
+        (dart-log
+         "Cannot find `dart' executable or Dart analysis server snapshot.")
+      (dart--start-analysis-server-for-current-buffer)))
   (run-hooks 'c-mode-common-hook)
   (run-hooks 'dart-mode-hook)
   (c-update-modeline))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]