From 041afb2d37124c5a89e9abcf637a39087e480c9c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 3 Dec 2016 17:59:36 -0800 Subject: [PATCH] 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 1b78823ccdb..cb9f7b66ff0 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)) -- 2.39.2