emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 13d4dd1: Tweak recent flymake change


From: Glenn Morris
Subject: [Emacs-diffs] master 13d4dd1: Tweak recent flymake change
Date: Tue, 6 Dec 2016 01:11:14 +0000 (UTC)

branch: master
commit 13d4dd1add0f13c0b1462f27f9fab55a1ff67a66
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Tweak recent flymake change
    
    * lisp/progmodes/flymake.el (flymake-report-fatal-status):
    Avoid double message when flymake-log-level >= 0.
    * doc/misc/flymake.texi (Customizable variables):
    No longer mention flymake-gui-warnings-enabled.
---
 doc/misc/flymake.texi     |    6 ------
 lisp/progmodes/flymake.el |    7 ++++---
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index 998f1b3..6cece30 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -323,12 +323,6 @@ file cannot be run simultaneously.
 If any changes are made to the buffer, syntax check is automatically
 started after @code{flymake-no-changes-timeout} seconds.
 
address@hidden flymake-gui-warnings-enabled
-A boolean flag indicating whether Flymake will show message boxes for
-non-recoverable errors.  If @code{flymake-gui-warnings-enabled} is
address@hidden, these errors will only be logged to the @file{*Messages*}
-buffer.
-
 @item flymake-start-syntax-check-on-newline
 A boolean flag indicating whether to start syntax check after a
 newline character is added to the buffer.
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index cb9f7b6..846ec22 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -1198,10 +1198,11 @@ For the format of LINE-ERR-INFO, see 
`flymake-ler-make-ler'."
 
 (defun flymake-report-fatal-status (status warning)
   "Display a warning and switch flymake mode off."
-  ;; This should really by flymake-log 0, but that is not shown by default.
-  ;; flymake-mode already uses message if no file name.
+  ;; This first message was always shown by default, and flymake-log
+  ;; does nothing by default, hence the use of message.
   ;; Another option is display-warning.
-  (message "Flymake: %s. Flymake will be switched OFF" warning)
+  (if (< flymake-log-level 0)
+      (message "Flymake: %s. Flymake will be switched OFF" warning))
   (flymake-mode 0)
   (flymake-log 0 "switched OFF Flymake mode for buffer %s due to fatal status 
%s, warning %s"
                (buffer-name) status warning))



reply via email to

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