[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27114: 25.2: fringe click echoes "Emacs-Lisp:" in emacs-lisp mode
From: |
Eli Zaretskii |
Subject: |
bug#27114: 25.2: fringe click echoes "Emacs-Lisp:" in emacs-lisp mode |
Date: |
Sun, 20 Aug 2017 17:58:31 +0300 |
> Date: Sun, 20 Aug 2017 16:14:40 +0200
> From: charles@aurox.ch (Charles A. Roelli)
> CC: eliz@gnu.org, npostavs@users.sourceforge.net,
> 27114@debbugs.gnu.org
>
> > --- a/lisp/progmodes/elisp-mode.el
> > +++ b/lisp/progmodes/elisp-mode.el
> > @@ -45,7 +45,7 @@ emacs-lisp-mode-syntax-table
> > "Syntax table used in `emacs-lisp-mode'.")
> >
> > (defvar emacs-lisp-mode-map
> > - (let ((map (make-sparse-keymap "Emacs-Lisp"))
> > + (let ((map (make-sparse-keymap))
> > (menu-map (make-sparse-keymap "Emacs-Lisp"))
> > (lint-map (make-sparse-keymap))
> > (prof-map (make-sparse-keymap))
>
> Thanks for finding this out. The function that prints "Emacs-Lisp:"
> to the echo area during the click is "read_char_minibuf_menu_prompt"
> (keyboard.c), which calls Fkeymap_prompt (which in the scenario of
> this bug, returns "Emacs-Lisp"), and eventually executes these lines:
>
> /* Prompt with that and read response. */
> message3_nolog (apply1 (intern ("concat"), Fnreverse (menu_strings)));
>
> Maybe it's wrong for "read_char" to call this function
> ("read_char_minibuf_menu_prompt") for some click events.
No, it's not wrong. It's a feature: it provides visual feedback for
incomplete mouse clicks. The ELisp manual explicitly says to provide
this string, which it calls "overall prompt", for all keymaps that can
be menus. Which this keymap can.
(If you make the proposed change, and then visit some .el file and
click C-mouse-3, what do you see in the header of the pop-up menu?)
What I don't quite understand is why mouse-1 on the fringe invokes
lisp-mode-map. Can you tell where's the offending binding which
causes that?
Thanks.