diff options
| author | Juri Linkov | 2018-02-22 23:59:32 +0200 |
|---|---|---|
| committer | Juri Linkov | 2018-02-22 23:59:32 +0200 |
| commit | dad1aeb30760ef524e95e636c22346b051233a38 (patch) | |
| tree | e469c48d718e557f8c58e75c00382d721df804e8 | |
| parent | 8ba61ffd8cebb0ff9f7a219022f3c1f3eac2f6d0 (diff) | |
| download | emacs-dad1aeb30760ef524e95e636c22346b051233a38.tar.gz emacs-dad1aeb30760ef524e95e636c22346b051233a38.zip | |
* lisp/help.el (view-lossage): Use the same format as in edit-last-kbd-macro.
Call comment-indent with let-bound comment-start and comment-column.
(Bug#30560)
| -rw-r--r-- | etc/NEWS | 8 | ||||
| -rw-r--r-- | lisp/help.el | 14 |
2 files changed, 15 insertions, 7 deletions
| @@ -160,6 +160,14 @@ bound to 'C-c C-f'. | |||
| 160 | 'dired-do-copy' and 'dired-rename-file' should create non-existent | 160 | 'dired-do-copy' and 'dired-rename-file' should create non-existent |
| 161 | directories in the destination. | 161 | directories in the destination. |
| 162 | 162 | ||
| 163 | ** Help | ||
| 164 | |||
| 165 | *** 'C-h l' (view-lossage) now displays last keystrokes and commands | ||
| 166 | in the same format as the edit buffer of edit-last-kbd-macro. | ||
| 167 | This makes possible to copy the lines from the buffer generated | ||
| 168 | by 'view-lossage', yank them to the buffer "*Edit Macro*" created by | ||
| 169 | 'edit-last-kbd-macro', and save the macro by 'C-c C-c'. | ||
| 170 | |||
| 163 | ** Ibuffer | 171 | ** Ibuffer |
| 164 | 172 | ||
| 165 | --- | 173 | --- |
diff --git a/lisp/help.el b/lisp/help.el index 4899bc44e03..9575f5b090c 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -465,8 +465,8 @@ To record all your input, use `open-dribble-file'." | |||
| 465 | (princ (mapconcat (lambda (key) | 465 | (princ (mapconcat (lambda (key) |
| 466 | (cond | 466 | (cond |
| 467 | ((and (consp key) (null (car key))) | 467 | ((and (consp key) (null (car key))) |
| 468 | (format "[%s]\n" (if (symbolp (cdr key)) (cdr key) | 468 | (format ";; %s\n" (if (symbolp (cdr key)) (cdr key) |
| 469 | "anonymous-command"))) | 469 | "anonymous-command"))) |
| 470 | ((or (integerp key) (symbolp key) (listp key)) | 470 | ((or (integerp key) (symbolp key) (listp key)) |
| 471 | (single-key-description key)) | 471 | (single-key-description key)) |
| 472 | (t | 472 | (t |
| @@ -475,11 +475,11 @@ To record all your input, use `open-dribble-file'." | |||
| 475 | " ")) | 475 | " ")) |
| 476 | (with-current-buffer standard-output | 476 | (with-current-buffer standard-output |
| 477 | (goto-char (point-min)) | 477 | (goto-char (point-min)) |
| 478 | (while (not (eobp)) | 478 | (let ((comment-start ";; ") |
| 479 | (move-to-column 50) | 479 | (comment-column 24)) |
| 480 | (unless (eolp) | 480 | (while (not (eobp)) |
| 481 | (fill-region (line-beginning-position) (line-end-position))) | 481 | (comment-indent) |
| 482 | (forward-line 1)) | 482 | (forward-line 1))) |
| 483 | ;; jidanni wants to see the last keystrokes immediately. | 483 | ;; jidanni wants to see the last keystrokes immediately. |
| 484 | (set-marker help-window-point-marker (point))))) | 484 | (set-marker help-window-point-marker (point))))) |
| 485 | 485 | ||