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: Sun, 20 Aug 2017 16:14:40 +0200

> From: Alex <agrambot@gmail.com>
> Date: Wed, 09 Aug 2017 17:07:57 -0600
> 
> The following diff appears to fix this bug, but I'm not sure if it
> should be applied. Hopefully it helps either way.
> 
> diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
> index b3f452ca5b..1d90fa94f3 100644
> --- 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.

For reference, the backtrace is here:

#0  read_char_minibuf_menu_prompt (map=<optimized out>, commandflag=<optimized 
out>) at keyboard.c:8697
#1  read_char (commandflag=1, map=4342105123, prev_event=30432, 
used_mouse_menu=0x7fff5fbff40f, end_time=0x0) at keyboard.c:2550
#2  0x00000001000c0676 in read_key_sequence (keybuf=0x7fff5fbff4c0, bufsize=30, 
prompt=0, dont_downcase_last=false, can_return_switch_frame=true, 
fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9151
#3  0x00000001000c202c in command_loop_1 () at keyboard.c:1372
#4  0x000000010012ac53 in internal_condition_case (bfun=0x1000c1d30 
<command_loop_1>, handlers=<optimized out>, hfun=0x1000ba260 <cmd_error>) at 
eval.c:1323
#5  0x00000001000b7c38 in command_loop_2 (ignore=<optimized out>) at 
keyboard.c:1114
#6  0x000000010012acd7 in internal_catch (tag=<optimized out>, func=0x1000b7c10 
<command_loop_2>, arg=0) at eval.c:1088
#7  0x00000001000b73a8 in command_loop () at keyboard.c:1093
#8  0x00000001000b7489 in recursive_edit_1 () at keyboard.c:699
#9  0x00000001000ba551 in Frecursive_edit () at keyboard.c:770
#10 0x00000001000affe8 in main (argc=2, argv=0x7fff5fbff950) at emacs.c:1706





reply via email to

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