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.
This commit is contained in:
parent
deef41a825
commit
1769a58830
2 changed files with 4 additions and 2 deletions
|
@ -2120,8 +2120,9 @@ frame's display)."
|
||||||
;; a toggle.
|
;; a toggle.
|
||||||
(featurep 't-mouse)
|
(featurep 't-mouse)
|
||||||
;; No way to check whether a w32 console has a mouse, assume
|
;; No way to check whether a w32 console has a mouse, assume
|
||||||
;; it always does.
|
;; it always does, except in batch invocations.
|
||||||
(boundp 'w32-use-full-screen-buffer))))))
|
(and (not noninteractive)
|
||||||
|
(boundp 'w32-use-full-screen-buffer)))))))
|
||||||
|
|
||||||
(defun display-popup-menus-p (&optional display)
|
(defun display-popup-menus-p (&optional display)
|
||||||
"Return non-nil if popup menus are supported on DISPLAY.
|
"Return non-nil if popup menus are supported on DISPLAY.
|
||||||
|
|
|
@ -611,6 +611,7 @@ then remove all hi-lock highlighting."
|
||||||
(cond
|
(cond
|
||||||
(current-prefix-arg (list t))
|
(current-prefix-arg (list t))
|
||||||
((and (display-popup-menus-p)
|
((and (display-popup-menus-p)
|
||||||
|
last-nonmenu-event
|
||||||
(listp last-nonmenu-event)
|
(listp last-nonmenu-event)
|
||||||
use-dialog-box)
|
use-dialog-box)
|
||||||
(catch 'snafu
|
(catch 'snafu
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue