emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 1769a588300: Fix some uses of 'use-dialog-box'


From: Eli Zaretskii
Subject: emacs-29 1769a588300: Fix some uses of 'use-dialog-box'
Date: Sat, 18 Feb 2023 03:59:01 -0500 (EST)

branch: emacs-29
commit 1769a588300f471a85fe8887864ae33340dececb
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    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.
---
 lisp/frame.el   | 5 +++--
 lisp/hi-lock.el | 1 +
 2 files changed, 4 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.
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index 78fc5e6f716..5c536b190fb 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -611,6 +611,7 @@ then remove all hi-lock highlighting."
    (cond
     (current-prefix-arg (list t))
     ((and (display-popup-menus-p)
+          last-nonmenu-event
           (listp last-nonmenu-event)
           use-dialog-box)
      (catch 'snafu



reply via email to

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