bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#41338: Toolbar-bug in Emacs 27.0.91/Pretest


From: Juri Linkov
Subject: bug#41338: Toolbar-bug in Emacs 27.0.91/Pretest
Date: Fri, 12 Jun 2020 01:51:54 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> Why doesn't clicking the `X' emit the
> `delete-frame' event?
>
> If I use `emacs -Q', in the Emacs 27 pretest
> or in Emacs 26.3 or earlier, and if I do this
> and then click the `X' icon:
>
> (define-key special-event-map [delete-frame]
>   (lambda (&rest ignore)
>     (interactive)
>     (message "HHHHHHHHHHHHHH")))
>
> I just get the message, as expected.

This is not what is used in isearch: isearch doesn't use special-event-map,
isearch uses overriding-terminal-local-map, so the proper test case is:

(setq overriding-terminal-local-map
      (let ((map (make-keymap)))
        (define-key map [delete-frame]
          (lambda (&rest ignore)
            (interactive)
            (message "DELETE-FRAME")))
        (define-key map "!"
          (lambda (&rest ignore)
            (interactive)
            (message "!")))
        map))

and indeed typing '!' you get the message,
but no message when clicking the `X' icon.





reply via email to

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