diff options
| author | Stefan Kangas | 2022-06-17 12:49:57 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2022-06-17 13:12:03 +0200 |
| commit | abdc5887c1fb81ec7ce22d0645e4dfa10f9eee29 (patch) | |
| tree | 6632746bf145609f683e4adf535c1d803b5ffd94 | |
| parent | 77c7a79a3fcc0ace2b58ae21b9fcb93bf536d923 (diff) | |
| download | emacs-abdc5887c1fb81ec7ce22d0645e4dfa10f9eee29.tar.gz emacs-abdc5887c1fb81ec7ce22d0645e4dfa10f9eee29.zip | |
Use command substitution in bookmark-edit-annotation
* lisp/bookmark.el (bookmark-default-annotation-text): Use command
substitution.
(bookmark-edit-annotation): Enter mode before inserting annotation
to get the correct command substitution.
| -rw-r--r-- | lisp/bookmark.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index b0b54e52d88..4a8ffc0fa07 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el | |||
| @@ -1027,7 +1027,8 @@ annotations." | |||
| 1027 | bookmark-name) | 1027 | bookmark-name) |
| 1028 | (format-message | 1028 | (format-message |
| 1029 | "# All lines which start with a `#' will be deleted.\n") | 1029 | "# All lines which start with a `#' will be deleted.\n") |
| 1030 | "# Type C-c C-c when done.\n#\n" | 1030 | (substitute-command-keys |
| 1031 | "# Type \\[bookmark-send-edited-annotation] when done.\n#\n") | ||
| 1031 | "# Author: " (user-full-name) " <" (user-login-name) "@" | 1032 | "# Author: " (user-full-name) " <" (user-login-name) "@" |
| 1032 | (system-name) ">\n" | 1033 | (system-name) ">\n" |
| 1033 | "# Date: " (current-time-string) "\n")) | 1034 | "# Date: " (current-time-string) "\n")) |
| @@ -1094,8 +1095,8 @@ Lines beginning with `#' are ignored." | |||
| 1094 | If optional argument FROM-BOOKMARK-LIST is non-nil, return to the | 1095 | If optional argument FROM-BOOKMARK-LIST is non-nil, return to the |
| 1095 | bookmark list when editing is done." | 1096 | bookmark list when editing is done." |
| 1096 | (pop-to-buffer (generate-new-buffer-name "*Bookmark Annotation Compose*")) | 1097 | (pop-to-buffer (generate-new-buffer-name "*Bookmark Annotation Compose*")) |
| 1097 | (bookmark-insert-annotation bookmark-name-or-record) | ||
| 1098 | (bookmark-edit-annotation-mode) | 1098 | (bookmark-edit-annotation-mode) |
| 1099 | (bookmark-insert-annotation bookmark-name-or-record) | ||
| 1099 | (setq bookmark--annotation-from-bookmark-list from-bookmark-list) | 1100 | (setq bookmark--annotation-from-bookmark-list from-bookmark-list) |
| 1100 | (setq bookmark-annotation-name bookmark-name-or-record)) | 1101 | (setq bookmark-annotation-name bookmark-name-or-record)) |
| 1101 | 1102 | ||