[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dart-mode caa7a19 124/192: Don't error out with revert-buf
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dart-mode caa7a19 124/192: Don't error out with revert-buffer |
Date: |
Sun, 29 Aug 2021 11:02:03 -0400 (EDT) |
branch: elpa/dart-mode
commit caa7a19a8719dc2adfd952a84776c2f88ee3776f
Author: Natalie Weizenbaum <nweiz@google.com>
Commit: Natalie Weizenbaum <nweiz@google.com>
Don't error out with revert-buffer
---
dart-mode.el | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/dart-mode.el b/dart-mode.el
index 832d241..4584d94 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -833,13 +833,16 @@ Initializes analysis server support for all `dart-mode'
buffers."
The Dart analysis server allows clients to 'overlay' file contents with
a client-supplied string. This is needed because we want Emacs to report
errors for the current contents of the buffer, not whatever is saved to disk."
- (dart--analysis-server-send
- "analysis.updateContent"
- `((files .
- ((,buffer-file-name . ((type . "add")
- (content . ,(save-restriction
- (widen)
- (buffer-string))))))))))
+ ;; buffer-file-name can be nil within revert-buffer, but in that case the
+ ;; buffer is just being reverted to its format on disk anyway.
+ (when buffer-file-name
+ (dart--analysis-server-send
+ "analysis.updateContent"
+ `((files .
+ ((,buffer-file-name . ((type . "add")
+ (content . ,(save-restriction
+ (widen)
+ (buffer-string)))))))))))
(defun dart-change-analysis-overlay
(change-begin change-end change-before-length)
- [nongnu] elpa/dart-mode 147f554 063/192: Merge pull request #11 from hterkelsen/dartanalyzer, (continued)
- [nongnu] elpa/dart-mode 147f554 063/192: Merge pull request #11 from hterkelsen/dartanalyzer, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 89573d5 067/192: Use a pipe instead of a pty for the analysis server, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 35a794c 086/192: Add workaround for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18845 (#40), ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 9b11e8f 088/192: Another attempt at fixing byte compilation. (#42), ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 3a73a1f 090/192: Make dart-executable-path resilient to wrappers, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode b4e592f 098/192: Add more search commands, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode c172f19 106/192: Support completing multiple parameters, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 2b085f5 125/192: Do not fail if Flycheck is not available. (#52), ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode c973dea 127/192: Require ‘help-mode’., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 68f7f4f 132/192: Require cl for emacs 24.4, 24.5, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode caa7a19 124/192: Don't error out with revert-buffer,
ELPA Syncer <=
- [nongnu] elpa/dart-mode 199709f 148/192: Removes cc-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode da244c6 144/192: Fixes no such file or directory, dartfmt.exe, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 9db2679 143/192: Fixes invalid file path format on Windows, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 06e2d4b 160/192: Respect font-lock-maximum-decoration, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 3082066 185/192: Don't font lock anchor in a string, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode ad93bc1 165/192: Edit headers, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode f6a1c9a79 171/192: Fix byte-compiling errors and warnings, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1273ccb 191/192: Make changes to list of dart-mode keywords easier to diff, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode a9899a9 182/192: Fontify abstract methods, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode c523992 004/192: Handle map indentation with identifiers., ELPA Syncer, 2021/08/29