summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/warnings.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-09-06 18:34:18 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-09-06 18:34:18 +0200
commitb2f41a8a18688a3d7eeea94c19864268c9eaf4c8 (patch)
tree27abb6601193116cf55c3f5903a8c1cdcda7520d /lisp/emacs-lisp/warnings.el
parentd7197f9d99ca6aa326d38e64ca9eb1d13e18d664 (diff)
downloademacs-b2f41a8a18688a3d7eeea94c19864268c9eaf4c8.tar.gz
emacs-b2f41a8a18688a3d7eeea94c19864268c9eaf4c8.tar.bz2
emacs-b2f41a8a18688a3d7eeea94c19864268c9eaf4c8.zip
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).
Diffstat (limited to 'lisp/emacs-lisp/warnings.el')
-rw-r--r--lisp/emacs-lisp/warnings.el19
1 files changed, 11 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 3a568cb834c..e10c149d89c 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)