1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 03:40:56 -08:00

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.
This commit is contained in:
Glenn Morris 2016-12-03 17:59:36 -08:00
parent b905454680
commit 041afb2d37

View file

@ -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))