summaryrefslogtreecommitdiff
path: root/lisp/frame.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2023-02-18 10:58:00 +0200
committerEli Zaretskii <eliz@gnu.org>2023-02-18 10:58:00 +0200
commit1769a588300f471a85fe8887864ae33340dececb (patch)
tree3143e7f8d87c64f6218b4f2649ed029658b1dba5 /lisp/frame.el
parentdeef41a82590658455bfd6468b2811147dd5f845 (diff)
downloademacs-1769a588300f471a85fe8887864ae33340dececb.tar.gz
emacs-1769a588300f471a85fe8887864ae33340dececb.tar.bz2
emacs-1769a588300f471a85fe8887864ae33340dececb.zip
Fix some uses of 'use-dialog-box'
* lisp/frame.el (display-mouse-p): Fix return value on MS-Windows in batch invocations. * lisp/hi-lock.el (hi-lock-unface-buffer): Don't consider 'last-nonmenu-event' being nil as a mouse event, for the purpose of using dialog boxes.
Diffstat (limited to 'lisp/frame.el')
-rw-r--r--lisp/frame.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/frame.el b/lisp/frame.el
index af95a047c38..81383349354 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -2120,8 +2120,9 @@ frame's display)."
;; a toggle.
(featurep 't-mouse)
;; No way to check whether a w32 console has a mouse, assume
- ;; it always does.
- (boundp 'w32-use-full-screen-buffer))))))
+ ;; it always does, except in batch invocations.
+ (and (not noninteractive)
+ (boundp 'w32-use-full-screen-buffer)))))))
(defun display-popup-menus-p (&optional display)
"Return non-nil if popup menus are supported on DISPLAY.