diff options
| author | Glenn Morris | 2016-12-03 17:59:36 -0800 |
|---|---|---|
| committer | Glenn Morris | 2016-12-03 17:59:36 -0800 |
| commit | 041afb2d37124c5a89e9abcf637a39087e480c9c (patch) | |
| tree | 74f268f11b008e436c3e0de6fde931cbb2b7a5f1 | |
| parent | b905454680c7200e92112a54d2ebaf709776ca6a (diff) | |
| download | emacs-041afb2d37124c5a89e9abcf637a39087e480c9c.tar.gz emacs-041afb2d37124c5a89e9abcf637a39087e480c9c.zip | |
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.
| -rw-r--r-- | lisp/progmodes/flymake.el | 15 |
1 files 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'." | |||
| 102 | "Enables/disables GUI warnings." | 102 | "Enables/disables GUI warnings." |
| 103 | :group 'flymake | 103 | :group 'flymake |
| 104 | :type 'boolean) | 104 | :type 'boolean) |
| 105 | (make-obsolete-variable 'flymake-gui-warnings-enabled | ||
| 106 | "it no longer has any effect." "26.1") | ||
| 105 | 107 | ||
| 106 | (defcustom flymake-start-syntax-check-on-find-file t | 108 | (defcustom flymake-start-syntax-check-on-find-file t |
| 107 | "Start syntax check on find file." | 109 | "Start syntax check on find file." |
| @@ -1190,15 +1192,16 @@ For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'." | |||
| 1190 | (setq flymake-mode-line mode-line) | 1192 | (setq flymake-mode-line mode-line) |
| 1191 | (force-mode-line-update))) | 1193 | (force-mode-line-update))) |
| 1192 | 1194 | ||
| 1193 | (defun flymake-display-warning (warning) | 1195 | ;; Nothing in flymake uses this at all any more, so this is just for |
| 1194 | "Display a warning to user." | 1196 | ;; third-party compatibility. |
| 1195 | (message-box warning)) | 1197 | (define-obsolete-function-alias 'flymake-display-warning 'message-box "26.1") |
| 1196 | 1198 | ||
| 1197 | (defun flymake-report-fatal-status (status warning) | 1199 | (defun flymake-report-fatal-status (status warning) |
| 1198 | "Display a warning and switch flymake mode off." | 1200 | "Display a warning and switch flymake mode off." |
| 1199 | (when flymake-gui-warnings-enabled | 1201 | ;; This should really by flymake-log 0, but that is not shown by default. |
| 1200 | (flymake-display-warning (format "Flymake: %s. Flymake will be switched OFF" warning)) | 1202 | ;; flymake-mode already uses message if no file name. |
| 1201 | ) | 1203 | ;; Another option is display-warning. |
| 1204 | (message "Flymake: %s. Flymake will be switched OFF" warning) | ||
| 1202 | (flymake-mode 0) | 1205 | (flymake-mode 0) |
| 1203 | (flymake-log 0 "switched OFF Flymake mode for buffer %s due to fatal status %s, warning %s" | 1206 | (flymake-log 0 "switched OFF Flymake mode for buffer %s due to fatal status %s, warning %s" |
| 1204 | (buffer-name) status warning)) | 1207 | (buffer-name) status warning)) |