aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-08-05 15:49:28 +0200
committerLars Ingebrigtsen2019-08-05 15:49:28 +0200
commit0bbcd89cf52c23e872b5b94d3e2f8f4161e2bf6e (patch)
treefcabe899c69e557e95c625633e747334786a0b74
parent6c1d0d53b34d9350d55ebbd83ea56aa751a55f1b (diff)
downloademacs-0bbcd89cf52c23e872b5b94d3e2f8f4161e2bf6e.tar.gz
emacs-0bbcd89cf52c23e872b5b94d3e2f8f4161e2bf6e.zip
Revert "Make `view-lossage' output of chars read from `read-char' more logical"
This reverts commit 1abf76877847226daa5ab7e07000ac1d4aba3478. This change apparently led to problems with kmacro.
-rw-r--r--lisp/help.el34
-rw-r--r--src/keyboard.c13
2 files changed, 14 insertions, 33 deletions
diff --git a/lisp/help.el b/lisp/help.el
index ba76d267571..039d0c44e4f 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -465,28 +465,18 @@ To record all your input, use `open-dribble-file'."
465 (help-setup-xref (list #'view-lossage) 465 (help-setup-xref (list #'view-lossage)
466 (called-interactively-p 'interactive)) 466 (called-interactively-p 'interactive))
467 (with-help-window (help-buffer) 467 (with-help-window (help-buffer)
468 (with-current-buffer standard-output 468 (princ " ")
469 (let ((prev-command nil)) 469 (princ (mapconcat (lambda (key)
470 (mapc 470 (cond
471 (lambda (key) 471 ((and (consp key) (null (car key)))
472 (cond 472 (format ";; %s\n" (if (symbolp (cdr key)) (cdr key)
473 ((and (consp key) (null (car key))) 473 "anonymous-command")))
474 (princ (format ";; %s\n" 474 ((or (integerp key) (symbolp key) (listp key))
475 (setq prev-command 475 (single-key-description key))
476 (if (symbolp (cdr key)) 476 (t
477 (cdr key) 477 (prin1-to-string key nil))))
478 "anonymous-command"))))) 478 (recent-keys 'include-cmds)
479 ((eq key 'end-of-command) 479 " "))
480 (unless (bolp)
481 (princ (format ";; <during %s>\n" (or prev-command
482 "unknown command")))))
483 ((or (integerp key) (symbolp key) (listp key))
484 (princ (single-key-description key))
485 (princ " "))
486 (t
487 (prin1 key)
488 (princ " "))))
489 (recent-keys 'include-cmds))))
490 (with-current-buffer standard-output 480 (with-current-buffer standard-output
491 (goto-char (point-min)) 481 (goto-char (point-min))
492 (let ((comment-start ";; ") 482 (let ((comment-start ";; ")
diff --git a/src/keyboard.c b/src/keyboard.c
index 158daba260c..30686a25898 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -307,7 +307,6 @@ static Lisp_Object command_loop (void);
307 307
308static void echo_now (void); 308static void echo_now (void);
309static ptrdiff_t echo_length (void); 309static ptrdiff_t echo_length (void);
310static void record_char (Lisp_Object c);
311 310
312/* Incremented whenever a timer is run. */ 311/* Incremented whenever a timer is run. */
313unsigned timers_run; 312unsigned timers_run;
@@ -1422,8 +1421,6 @@ command_loop_1 (void)
1422 Fcons (Qnil, cmd)); 1421 Fcons (Qnil, cmd));
1423 if (++recent_keys_index >= NUM_RECENT_KEYS) 1422 if (++recent_keys_index >= NUM_RECENT_KEYS)
1424 recent_keys_index = 0; 1423 recent_keys_index = 0;
1425 /* Mark this as a complete command in recent_keys. */
1426 record_char (Qend_of_command);
1427 } 1424 }
1428 Vthis_command = cmd; 1425 Vthis_command = cmd;
1429 Vreal_this_command = cmd; 1426 Vreal_this_command = cmd;
@@ -1474,9 +1471,6 @@ command_loop_1 (void)
1474 1471
1475 safe_run_hooks (Qpost_command_hook); 1472 safe_run_hooks (Qpost_command_hook);
1476 1473
1477 /* Mark this as a complete command in recent_keys. */
1478 record_char (Qend_of_command);
1479
1480 /* If displaying a message, resize the echo area window to fit 1474 /* If displaying a message, resize the echo area window to fit
1481 that message's size exactly. Do this only if the echo area 1475 that message's size exactly. Do this only if the echo area
1482 window is the minibuffer window of the selected frame. See 1476 window is the minibuffer window of the selected frame. See
@@ -2095,6 +2089,7 @@ show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object,
2095 2089
2096static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, bool *used_mouse_menu, 2090static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, bool *used_mouse_menu,
2097 struct timespec *end_time); 2091 struct timespec *end_time);
2092static void record_char (Lisp_Object c);
2098 2093
2099static Lisp_Object help_form_saved_window_configs; 2094static Lisp_Object help_form_saved_window_configs;
2100static void 2095static void
@@ -10001,9 +9996,7 @@ represented as pseudo-events of the form (nil . COMMAND). */)
10001 do 9996 do
10002 { 9997 {
10003 Lisp_Object e = AREF (recent_keys, i); 9998 Lisp_Object e = AREF (recent_keys, i);
10004 if (cmds 9999 if (cmds || !CONSP (e) || !NILP (XCAR (e)))
10005 || ((!CONSP (e) || !NILP (XCAR (e)))
10006 && !EQ (e, Qend_of_command)))
10007 es = Fcons (e, es); 10000 es = Fcons (e, es);
10008 if (++i >= NUM_RECENT_KEYS) 10001 if (++i >= NUM_RECENT_KEYS)
10009 i = 0; 10002 i = 0;
@@ -11073,8 +11066,6 @@ syms_of_keyboard (void)
11073 11066
11074 DEFSYM (Qundefined, "undefined"); 11067 DEFSYM (Qundefined, "undefined");
11075 11068
11076 DEFSYM (Qend_of_command, "end-of-command");
11077
11078 /* Hooks to run before and after each command. */ 11069 /* Hooks to run before and after each command. */
11079 DEFSYM (Qpre_command_hook, "pre-command-hook"); 11070 DEFSYM (Qpre_command_hook, "pre-command-hook");
11080 DEFSYM (Qpost_command_hook, "post-command-hook"); 11071 DEFSYM (Qpost_command_hook, "post-command-hook");