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

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

[nongnu] elpa/go-mode ca3050a 045/495: temporarily disable flymake-mode


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode ca3050a 045/495: temporarily disable flymake-mode in go-remove-unused-imports
Date: Sat, 7 Aug 2021 09:04:40 -0400 (EDT)

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

    temporarily disable flymake-mode in go-remove-unused-imports
    
    Closes gh-12
---
 go-mode.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index 039607b..8739d28 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -669,7 +669,8 @@ 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)) lines)
+    (let ((cur-buffer (current-buffer)) (flymake-state flymake-mode) lines)
+      (flymake-mode-off)
       (save-some-buffers nil (lambda () (equal cur-buffer (current-buffer))))
       (if (buffer-modified-p)
           (message "Cannot operate on unsaved buffer")
@@ -681,6 +682,7 @@ will be commented, otherwise they will be removed 
completely."
           (if arg
               (comment-region (line-beginning-position) (line-end-position))
             (kill-line)))
-        (message "Removed %d imports" (length lines))))))
+        (message "Removed %d imports" (length lines)))
+      (if flymake-state (flymake-mode-on)))))
 
 (provide 'go-mode)



reply via email to

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