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

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

Re: describe key ESC ESC: Args out of range


From: David Hunter
Subject: Re: describe key ESC ESC: Args out of range
Date: Fri, 25 Mar 2005 03:05:18 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)

Richard Stallman wrote:

    When I enter M-x describe-key ESC, then wait 2 or 3 seconds and then press a
    2nd ESC, emacs complains: Args out of range: "ESC escape", 0, 14

I can't reproduce this.  If it still fails for you, you should be able
to debug it easily by putting a breakpoint at args_out_of_range.

This error was also reported last month:
http://lists.gnu.org/archive/html/emacs-pretest-bug/2005-02/msg00071.html

I can reproduce it on ms_w32.  Backtrace is:

#0  args_out_of_range_3 (a1=35165091, a2=0, a3=112) at data.c:150
#1  0x010788d8 in Fsubstring (string=35165091, from=0, to=112) at fns.c:1274
#2  0x0100674b in echo_truncate (nchars=14) at keyboard.c:923
#3 0x01011c8a in read_key_sequence (keybuf=0x82f9a0, bufsize=30, prompt=35165283, dont_downcase_last=0, can_return_switch_frame=0, fix_current_buffer=0) at keyboard.c:8679 #4 0x01011f0e in Fread_key_sequence (prompt=35165283, continue_echo=23629825, dont_downcase_last=23629825, can_return_switch_frame=23629825, command_loop=23629825) at keyboard.c:9529 #5 0x01116d42 in Fcall_interactively (function=24685569, record_flag=23629825, keys=23707652) at callint.c:616 #6 0x0101239c in Fcommand_execute (cmd=24685569, record_flag=23629825, keys=23629825, special=23629825) at keyboard.c:9698
#7  0x010073d7 in command_loop_1 () at keyboard.c:1792
#8 0x0101e407 in internal_condition_case (bfun=0x10070c0 <command_loop_1>, handlers=23714417, hfun=0x1006ab0 <cmd_error>) at eval.c:1385
#9  0x01006ded in command_loop_2 () at keyboard.c:1319
#10 0x0101df0f in internal_catch (tag=23703513, func=0x1006dc0 <command_loop_2>, arg=23629825) at eval.c:1144
#11 0x01006d9c in command_loop () at keyboard.c:1298
#12 0x01006835 in recursive_edit_1 () at keyboard.c:991
#13 0x0100696d in Frecursive_edit () at keyboard.c:1052
#14 0x01003500 in main (argc=3, argv=0x1950e30) at emacs.c:1767

read_key_sequence() assumes that the minibuf starts with the initial prompt "Describe key: 
", but it only contains "ESC escape".  The prompt is cleared from the minibuf when 
you press the first ESC.  This clearing behavior does not occur for me on 21.2.

When describe-key is run interactively, echo_message_buffer is set to "Describe key: 
" by message3_nolog(), but then reset to Qnil by echo_area_display():

#0  echo_area_display (update_frame_p=1) at xdisp.c:8127
#1  0x0103da24 in message3_nolog (m=35054387, nbytes=14, multibyte=0)
   at xdisp.c:6976
#2  0x01006609 in echo_now () at keyboard.c:878
#3 0x01011d7c in read_key_sequence (keybuf=0x82f9a0, bufsize=30, prompt=35054387, dont_downcase_last=0, can_return_switch_frame=0, fix_current_buffer=0) at keyboard.c:8579 #4 0x01011f0e in Fread_key_sequence (prompt=35054387, continue_echo=23629825, dont_downcase_last=23629825, can_return_switch_frame=23629825, command_loop=23629825) at keyboard.c:9529 #5 0x01116d42 in Fcall_interactively (function=24685569, record_flag=23629825, keys=23707652) at callint.c:616

When read_char() gets its first char, it clears the minibuf by calling 
cancel_echoing() at line 2590, because echo_message_buffer is Qnil but 
echo_area_buffer[0] isn't.

If echo_area_display() is modified to not change echo_message_buffer, this 
error goes away.  CVS revision 1.976 made this change, but I don't know what it 
fixed...

-Dave




reply via email to

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