diff options
| author | Stefan Monnier | 2014-11-09 21:58:52 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2014-11-09 21:58:52 -0500 |
| commit | eca1ea96559e04e18a62a61208d501c557dd4cab (patch) | |
| tree | bc1b7bb276957c445917c7a70dbfe604710545ff | |
| parent | 155d93fff87a516197d29edbd02af9a10517bd61 (diff) | |
| download | emacs-eca1ea96559e04e18a62a61208d501c557dd4cab.tar.gz emacs-eca1ea96559e04e18a62a61208d501c557dd4cab.zip | |
* lisp/help.el (view-lossage): Include the actual commands run.
* src/keyboard.c (command_loop_1): Record this-command in recent-keys.
(Frecent_keys): Rewrite. and add optional `include-cmds' arg.
| -rw-r--r-- | etc/NEWS | 2 | ||||
| -rw-r--r-- | lisp/ChangeLog | 16 | ||||
| -rw-r--r-- | lisp/help.el | 25 | ||||
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/keyboard.c | 44 | ||||
| -rw-r--r-- | test/ChangeLog | 5 |
6 files changed, 69 insertions, 28 deletions
| @@ -49,6 +49,8 @@ Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to. | |||
| 49 | 49 | ||
| 50 | * Changes in Emacs 25.1 | 50 | * Changes in Emacs 25.1 |
| 51 | 51 | ||
| 52 | ** C-h l now also lists the commands that were run. | ||
| 53 | |||
| 52 | ** M-x suggests shorthands and ignores obsolete commands for completion. | 54 | ** M-x suggests shorthands and ignores obsolete commands for completion. |
| 53 | ** x-select-enable-clipboard is renamed select-enable-clipboard. | 55 | ** x-select-enable-clipboard is renamed select-enable-clipboard. |
| 54 | x-select-enable-primary and renamed select-enable-primary. | 56 | x-select-enable-primary and renamed select-enable-primary. |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 572de2ed950..94473f03b7f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2014-11-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * help.el (view-lossage): Include the actual commands run. | ||
| 4 | |||
| 1 | 2014-11-10 Dmitry Gutov <dgutov@yandex.ru> | 5 | 2014-11-10 Dmitry Gutov <dgutov@yandex.ru> |
| 2 | 6 | ||
| 3 | * vc/vc-dir.el (vc-dir-hide-state): Also hide `ignored' items when | 7 | * vc/vc-dir.el (vc-dir-hide-state): Also hide `ignored' items when |
| @@ -5,8 +9,8 @@ | |||
| 5 | 9 | ||
| 6 | 2014-11-09 Eric Ludlam <zappo@gnu.org> | 10 | 2014-11-09 Eric Ludlam <zappo@gnu.org> |
| 7 | 11 | ||
| 8 | * emacs-lisp/eieio-custom.el (eieio-customize-object): Set | 12 | * emacs-lisp/eieio-custom.el (eieio-customize-object): |
| 9 | eieio-cog (current group) to g, which is an improved form of input | 13 | Set eieio-cog (current group) to g, which is an improved form of input |
| 10 | group. | 14 | group. |
| 11 | 15 | ||
| 12 | 2014-11-09 Juri Linkov <juri@jurta.org> | 16 | 2014-11-09 Juri Linkov <juri@jurta.org> |
| @@ -14,8 +18,8 @@ | |||
| 14 | * isearch.el (isearch-message-prefix): Show "Multi-file" and | 18 | * isearch.el (isearch-message-prefix): Show "Multi-file" and |
| 15 | "Multi-buffer" instead of "Multi". (Bug#13592) | 19 | "Multi-buffer" instead of "Multi". (Bug#13592) |
| 16 | 20 | ||
| 17 | * misearch.el (multi-isearch-file-list): Autoload | 21 | * misearch.el (multi-isearch-file-list): |
| 18 | multi-isearch-buffer-list and multi-isearch-file-list. | 22 | Autoload multi-isearch-buffer-list and multi-isearch-file-list. |
| 19 | (multi-isearch-end): Reset multi-isearch-buffer-list and | 23 | (multi-isearch-end): Reset multi-isearch-buffer-list and |
| 20 | multi-isearch-file-list to nil. | 24 | multi-isearch-file-list to nil. |
| 21 | 25 | ||
| @@ -70,8 +74,8 @@ | |||
| 70 | 2014-11-08 Alan Mackenzie <acm@muc.de> | 74 | 2014-11-08 Alan Mackenzie <acm@muc.de> |
| 71 | 75 | ||
| 72 | Fix wrong bound to c-font-lock-declarators. Fixes bug #18948. | 76 | Fix wrong bound to c-font-lock-declarators. Fixes bug #18948. |
| 73 | * progmodes/cc-fonts.el (c-font-lock-declarations): Pass | 77 | * progmodes/cc-fonts.el (c-font-lock-declarations): |
| 74 | "(point-max)" as bound to c-font-lock-declarators, not "limit", as | 78 | Pass "(point-max)" as bound to c-font-lock-declarators, not "limit", as |
| 75 | the buffer is sometimes narrowed to less than "limit" (e.g., in | 79 | the buffer is sometimes narrowed to less than "limit" (e.g., in |
| 76 | the presence of macros). | 80 | the presence of macros). |
| 77 | 81 | ||
diff --git a/lisp/help.el b/lisp/help.el index 2da43d3ed48..eaee6d14736 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -448,25 +448,32 @@ is specified by the variable `message-log-max'." | |||
| 448 | (info "(efaq)Packages that do not come with Emacs")) | 448 | (info "(efaq)Packages that do not come with Emacs")) |
| 449 | 449 | ||
| 450 | (defun view-lossage () | 450 | (defun view-lossage () |
| 451 | "Display last 300 input keystrokes. | 451 | "Display last few input keystrokes and the commands run. |
| 452 | 452 | ||
| 453 | To record all your input, use `open-dribble-file'." | 453 | To record all your input, use `open-dribble-file'." |
| 454 | (interactive) | 454 | (interactive) |
| 455 | (help-setup-xref (list #'view-lossage) | 455 | (help-setup-xref (list #'view-lossage) |
| 456 | (called-interactively-p 'interactive)) | 456 | (called-interactively-p 'interactive)) |
| 457 | (with-help-window (help-buffer) | 457 | (with-help-window (help-buffer) |
| 458 | (princ " ") | ||
| 458 | (princ (mapconcat (lambda (key) | 459 | (princ (mapconcat (lambda (key) |
| 459 | (if (or (integerp key) (symbolp key) (listp key)) | 460 | (cond |
| 460 | (single-key-description key) | 461 | ((and (consp key) (null (car key))) |
| 461 | (prin1-to-string key nil))) | 462 | (format "[%s]\n" (if (symbolp (cdr key)) (cdr key) |
| 462 | (recent-keys) | 463 | "anonymous-command"))) |
| 464 | ((or (integerp key) (symbolp key) (listp key)) | ||
| 465 | (single-key-description key)) | ||
| 466 | (t | ||
| 467 | (prin1-to-string key nil)))) | ||
| 468 | (recent-keys 'include-cmds) | ||
| 463 | " ")) | 469 | " ")) |
| 464 | (with-current-buffer standard-output | 470 | (with-current-buffer standard-output |
| 465 | (goto-char (point-min)) | 471 | (goto-char (point-min)) |
| 466 | (while (progn (move-to-column 50) (not (eobp))) | 472 | (while (not (eobp)) |
| 467 | (when (search-forward " " nil t) | 473 | (move-to-column 50) |
| 468 | (delete-char -1)) | 474 | (unless (eolp) |
| 469 | (insert "\n")) | 475 | (fill-region (line-beginning-position) (line-end-position))) |
| 476 | (forward-line 1)) | ||
| 470 | ;; jidanni wants to see the last keystrokes immediately. | 477 | ;; jidanni wants to see the last keystrokes immediately. |
| 471 | (set-marker help-window-point-marker (point))))) | 478 | (set-marker help-window-point-marker (point))))) |
| 472 | 479 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 36f4dbdac66..b51f3c15a66 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-11-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * keyboard.c (command_loop_1): Record this-command in recent-keys. | ||
| 4 | (Frecent_keys): Rewrite. and add optional `include-cmds' arg. | ||
| 5 | |||
| 1 | 2014-11-09 Jan Djärv <jan.h.d@swipnet.se> | 6 | 2014-11-09 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * nsterm.m (ns_set_vertical_scroll_bar) | 8 | * nsterm.m (ns_set_vertical_scroll_bar) |
diff --git a/src/keyboard.c b/src/keyboard.c index 24f47bfedc9..060784cf0af 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1534,6 +1534,13 @@ command_loop_1 (void) | |||
| 1534 | 1534 | ||
| 1535 | /* Execute the command. */ | 1535 | /* Execute the command. */ |
| 1536 | 1536 | ||
| 1537 | { | ||
| 1538 | total_keys += total_keys < NUM_RECENT_KEYS; | ||
| 1539 | ASET (recent_keys, recent_keys_index, | ||
| 1540 | Fcons (Qnil, cmd)); | ||
| 1541 | if (++recent_keys_index >= NUM_RECENT_KEYS) | ||
| 1542 | recent_keys_index = 0; | ||
| 1543 | } | ||
| 1537 | Vthis_command = cmd; | 1544 | Vthis_command = cmd; |
| 1538 | Vreal_this_command = cmd; | 1545 | Vreal_this_command = cmd; |
| 1539 | safe_run_hooks (Qpre_command_hook); | 1546 | safe_run_hooks (Qpre_command_hook); |
| @@ -10048,23 +10055,34 @@ If CHECK-TIMERS is non-nil, timers that are ready to run will do so. */) | |||
| 10048 | ? Qt : Qnil); | 10055 | ? Qt : Qnil); |
| 10049 | } | 10056 | } |
| 10050 | 10057 | ||
| 10051 | DEFUN ("recent-keys", Frecent_keys, Srecent_keys, 0, 0, 0, | 10058 | DEFUN ("recent-keys", Frecent_keys, Srecent_keys, 0, 1, 0, |
| 10052 | doc: /* Return vector of last 300 events, not counting those from keyboard macros. */) | 10059 | doc: /* Return vector of last few events, not counting those from keyboard macros. |
| 10053 | (void) | 10060 | If INCLUDE-CMDS is non-nil, include the commands that were run, |
| 10061 | represented as events of the form (nil . COMMAND). */) | ||
| 10062 | (Lisp_Object include_cmds) | ||
| 10054 | { | 10063 | { |
| 10055 | Lisp_Object *keys = XVECTOR (recent_keys)->contents; | 10064 | bool cmds = !NILP (include_cmds); |
| 10056 | Lisp_Object val; | ||
| 10057 | 10065 | ||
| 10058 | if (total_keys < NUM_RECENT_KEYS) | 10066 | if (!total_keys |
| 10059 | return Fvector (total_keys, keys); | 10067 | || (cmds && total_keys < NUM_RECENT_KEYS)) |
| 10068 | return Fvector (total_keys, | ||
| 10069 | XVECTOR (recent_keys)->contents); | ||
| 10060 | else | 10070 | else |
| 10061 | { | 10071 | { |
| 10062 | val = Fvector (NUM_RECENT_KEYS, keys); | 10072 | Lisp_Object es = Qnil; |
| 10063 | vcopy (val, 0, keys + recent_keys_index, | 10073 | int i = (total_keys < NUM_RECENT_KEYS |
| 10064 | NUM_RECENT_KEYS - recent_keys_index); | 10074 | ? 0 : recent_keys_index); |
| 10065 | vcopy (val, NUM_RECENT_KEYS - recent_keys_index, | 10075 | eassert (recent_keys_index < NUM_RECENT_KEYS); |
| 10066 | keys, recent_keys_index); | 10076 | do |
| 10067 | return val; | 10077 | { |
| 10078 | Lisp_Object e = AREF (recent_keys, i); | ||
| 10079 | if (cmds || !CONSP (e) || !NILP (XCAR (e))) | ||
| 10080 | es = Fcons (e, es); | ||
| 10081 | if (++i >= NUM_RECENT_KEYS) | ||
| 10082 | i = 0; | ||
| 10083 | } while (i != recent_keys_index); | ||
| 10084 | es = Fnreverse (es); | ||
| 10085 | return Fvconcat (1, &es); | ||
| 10068 | } | 10086 | } |
| 10069 | } | 10087 | } |
| 10070 | 10088 | ||
diff --git a/test/ChangeLog b/test/ChangeLog index 86f8e240af4..48e01ca973a 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-11-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * automated/bytecomp-tests.el (bytecomp-tests--warnings): New tests. | ||
| 4 | * automated/cl-lib-tests.el: Rename from cl-lib.el. | ||
| 5 | |||
| 1 | 2014-10-28 Ulf Jasper <ulf.jasper@web.de> | 6 | 2014-10-28 Ulf Jasper <ulf.jasper@web.de> |
| 2 | 7 | ||
| 3 | * automated/libxml-tests.el: New file. | 8 | * automated/libxml-tests.el: New file. |