I'm having trouble with getting local keymap:s to work in the mode-line, but only in terminals (with
This applies to both the standard mode-line entries (like
mode-line-toggle-read-only) and entries I manually add.
For example, the following work in a GUI Emacs (tested on the NS port on macOS), but not in an Emacs running in a terminal. (When clicking on the
PRESSME text in the mode-line, the message
I was pressed should appear.):
(defun my-press-me () (interactive) (message "I was pressed")) (push '(:propertize "PRESSME" local-map (keymap (mode-line . (keymap (down-mouse-1 . my-press-me))))) mode-line-format)
Interestingly, when I press
C-h k and click in the
PRESSME text, it reports
my-press-me both in a GUI Emacs and when running in the terminal.