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

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

[nongnu] elpa/go-mode 1128e71 052/495: do not try to turn off flymake if


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 1128e71 052/495: do not try to turn off flymake if flymake isn't loaded
Date: Sat, 7 Aug 2021 09:04:42 -0400 (EDT)

branch: elpa/go-mode
commit 1128e715335c11908965ad6f7c77530de02f394f
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    do not try to turn off flymake if flymake isn't loaded
---
 go-mode.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index 26fb6c3..f8c0577 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -663,8 +663,11 @@ uncommented, otherwise a new import will be added."
 will be commented, otherwise they will be removed completely."
   (interactive "P")
   (save-excursion
-    (let ((cur-buffer (current-buffer)) (flymake-state flymake-mode) lines)
-      (flymake-mode-off)
+    (let ((cur-buffer (current-buffer)) flymake-state lines)
+      (if (boundp 'flymake-mode)
+          (progn
+            (setq flymake-state flymake-mode)
+            (flymake-mode-off)))
       (save-some-buffers nil (lambda () (equal cur-buffer (current-buffer))))
       (if (buffer-modified-p)
           (message "Cannot operate on unsaved buffer")



reply via email to

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