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

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

bug#29478: 26.0.90; `C-h k' followed by mouse clicks no longer shows dow


From: Eli Zaretskii
Subject: bug#29478: 26.0.90; `C-h k' followed by mouse clicks no longer shows down event
Date: Sat, 23 Dec 2017 11:42:10 +0200

> Date: Fri, 22 Dec 2017 22:05:49 +0000
> Cc: drew.adams@oracle.com, 29478@debbugs.gnu.org,
>   npostavs@users.sourceforge.net
> From: Alan Mackenzie <acm@muc.de>
> 
> (i) emacs-26 -Q
> (ii) M-: (read-key-sequence "prompt: ") <CR>
> (iii) <shift>-mouse-1
> 
> What happens now is the key sequence is displayed, a S-down-mouse-1
> event, but immediately overwritten in the message area by 
> 
>     <S-mouse-1> is undefined
> 
> .  Why?  I merely asked for the key sequence.  I didn't ask for it to be
> looked up in any key maps.  What is doing the translation from a
> shift-down-mouse event to a S-click event?  What is looking up this
> down-mouse event in a key map?

read-key-sequence itself examines the possible remapping of the
sequence.  And it seems reasonable, since how can it otherwise know
when the sequence is complete?

What is perhaps unexpected here (or might be a bug) is that for some
reason the sequence is left in unread-command-events (or somewhere
similar, perhaps in read_key_sequence_remapped?), because if I set a
breakpoint in Fding, the backtrace from the "is undefined" message
clearly shows it was the command loop that invoked 'undefined':

  Thread 1 hit Breakpoint 3, Fding (arg=XIL(0)) at dispnew.c:5666
  5666      if (!NILP (arg))
  (gdb) bt
  #0  Fding (arg=XIL(0)) at dispnew.c:5666
  #1  0x012269c1 in funcall_subr (subr=0x1383100 <Sding>, numargs=0,
      args=0x82f2e0) at eval.c:2841
  #2  0x01226412 in Ffuncall (nargs=1, args=0x82f2d8) at eval.c:2766
  #3  0x0128cef7 in exec_byte_code (bytestr=XIL(0x8000000001397478),
      vector=XIL(0xa000000001397488), maxdepth=make_number(4),
      args_template=make_number(0), nargs=0, args=0x82f750) at bytecode.c:62
  #4  0x01227510 in funcall_lambda (fun=XIL(0xa000000001397440), nargs=0,
      arg_vector=0x40000000) at eval.c:2967
  #5  0x0122646c in Ffuncall (nargs=1, args=0x82f748) at eval.c:2768
  #6  0x01225913 in call0 (fn=XIL(0xfca8)) at eval.c:2609
  #7  0x0114fd0d in command_loop_1 () at keyboard.c:1457
  #8  0x01220de9 in internal_condition_case (bfun=0x114f33f <command_loop_1>
      handlers=XIL(0x5b70), hfun=0x114e5bf <cmd_error>) at eval.c:1332
  #9  0x0114edd3 in command_loop_2 (ignore=XIL(0)) at keyboard.c:1110
  #10 0x0121ff1b in internal_catch (tag=XIL(0xf570),
      func=0x114ed97 <command_loop_2>, arg=XIL(0)) at eval.c:1097
  #11 0x0114ed52 in command_loop () at keyboard.c:1089
  #12 0x0114dfe7 in recursive_edit_1 () at keyboard.c:695
  #13 0x0114e289 in Frecursive_edit () at keyboard.c:766
  #14 0x0114b990 in main (argc=2, argv=0xa428d8) at emacs.c:1713

  Lisp Backtrace:
  "ding" (0x82f2e0)
  "undefined" (0x82f750)

CC'ing Stefan in the hope that he could have some insights.





reply via email to

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