emacs-diffs
[Top][All Lists]
Advanced

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

master b2f41a8: Disable display-warning buttons when doing batch compile


From: Lars Ingebrigtsen
Subject: master b2f41a8: Disable display-warning buttons when doing batch compiles
Date: Sun, 6 Sep 2020 12:34:39 -0400 (EDT)

branch: master
commit b2f41a8a18688a3d7eeea94c19864268c9eaf4c8
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Disable display-warning buttons when doing batch compiles
    
    * lisp/emacs-lisp/warnings.el (display-warning): Don't output the
    buttons when we're not interactive (bug#43244).
---
 lisp/emacs-lisp/warnings.el | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 3a568cb..e10c149 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -292,14 +292,17 @@ entirely by setting `warning-suppress-types' or
              (insert (format (nth 1 level-info)
                              (format warning-type-format typename))
                      message)
-              (insert " ")
-              (insert-button "Disable showing"
-                             'type 'warning-suppress-warning
-                             'warning-type type)
-              (insert " ")
-              (insert-button "Disable logging"
-                             'type 'warning-suppress-log-warning
-                             'warning-type type)
+              ;; Don't output the buttons when doing batch compilation
+              ;; and similar.
+              (unless noninteractive
+                (insert " ")
+                (insert-button "Disable showing"
+                               'type 'warning-suppress-warning
+                               'warning-type type)
+                (insert " ")
+                (insert-button "Disable logging"
+                               'type 'warning-suppress-log-warning
+                               'warning-type type))
               (funcall newline)
              (when (and warning-fill-prefix (not (string-match "\n" message)))
                (let ((fill-prefix warning-fill-prefix)



reply via email to

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