emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 041afb2: Stop flymake using dialog boxes for errors


From: Glenn Morris
Subject: [Emacs-diffs] master 041afb2: Stop flymake using dialog boxes for errors (Bug#16622)
Date: Sun, 4 Dec 2016 02:00:03 +0000 (UTC)

branch: master
commit 041afb2d37124c5a89e9abcf637a39087e480c9c
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Stop flymake using dialog boxes for errors (Bug#16622)
    
    * lisp/progmodes/flymake.el (flymake-gui-warnings-enabled):
    Mark as obsolete.
    (flymake-display-warning): Turn into an obsolete alias.
    (flymake-report-fatal-status): Just use message for a warning that
    was formerly displayed by default.
---
 lisp/progmodes/flymake.el |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 1b78823..cb9f7b6 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -102,6 +102,8 @@ See `flymake-error-bitmap' and `flymake-warning-bitmap'."
   "Enables/disables GUI warnings."
   :group 'flymake
   :type 'boolean)
+(make-obsolete-variable 'flymake-gui-warnings-enabled
+                       "it no longer has any effect." "26.1")
 
 (defcustom flymake-start-syntax-check-on-find-file t
   "Start syntax check on find file."
@@ -1190,15 +1192,16 @@ For the format of LINE-ERR-INFO, see 
`flymake-ler-make-ler'."
     (setq flymake-mode-line mode-line)
     (force-mode-line-update)))
 
-(defun flymake-display-warning (warning)
-  "Display a warning to user."
-  (message-box warning))
+;; Nothing in flymake uses this at all any more, so this is just for
+;; third-party compatibility.
+(define-obsolete-function-alias 'flymake-display-warning 'message-box "26.1")
 
 (defun flymake-report-fatal-status (status warning)
   "Display a warning and switch flymake mode off."
-  (when flymake-gui-warnings-enabled
-    (flymake-display-warning (format "Flymake: %s. Flymake will be switched 
OFF" warning))
-    )
+  ;; This should really by flymake-log 0, but that is not shown by default.
+  ;; flymake-mode already uses message if no file name.
+  ;; Another option is display-warning.
+  (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]