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

[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: Charles A. Roelli
Subject: bug#27114: 25.2: fringe click echoes "Emacs-Lisp:" in emacs-lisp mode
Date: Mon, 21 Aug 2017 15:20:14 +0200

> Date: Sun, 20 Aug 2017 17:58:31 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > 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.

Thanks.  But it seems this "overall prompt" should only be set for
menu keymaps, not general mode maps.

For example,

(keymap-prompt lisp-interaction-mode-map)
nil
(keymap-prompt python-mode-map)
nil
(keymap-prompt c-mode-map)
nil
(keymap-prompt emacs-lisp-mode-map)
"Emacs-Lisp"

> (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?)

I still see "Emacs-Lisp Mode" (it's unchanged).  Notice that Alex's
change removes the "overall prompt" from the "main" Emacs Lisp mode
keymap, but not the menu-map.





reply via email to

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