]> git.eshelyaron.com Git - emacs.git/commitdiff
Use command substitution in bookmark-edit-annotation
authorStefan Kangas <stefan@marxist.se>
Fri, 17 Jun 2022 10:49:57 +0000 (12:49 +0200)
committerStefan Kangas <stefan@marxist.se>
Fri, 17 Jun 2022 11:12:03 +0000 (13:12 +0200)
* lisp/bookmark.el (bookmark-default-annotation-text): Use command
substitution.
(bookmark-edit-annotation): Enter mode before inserting annotation
to get the correct command substitution.

lisp/bookmark.el

index b0b54e52d88b82b63df5adb4978b719ab6e2e12d..4a8ffc0fa07adc3885569eab563c43210a956b57 100644 (file)
@@ -1027,7 +1027,8 @@ annotations."
            bookmark-name)
          (format-message
            "#  All lines which start with a `#' will be deleted.\n")
-         "#  Type C-c C-c when done.\n#\n"
+          (substitute-command-keys
+           "#  Type \\[bookmark-send-edited-annotation] when done.\n#\n")
          "#  Author: " (user-full-name) " <" (user-login-name) "@"
          (system-name) ">\n"
          "#  Date:    " (current-time-string) "\n"))
@@ -1094,8 +1095,8 @@ Lines beginning with `#' are ignored."
 If optional argument FROM-BOOKMARK-LIST is non-nil, return to the
 bookmark list when editing is done."
   (pop-to-buffer (generate-new-buffer-name "*Bookmark Annotation Compose*"))
-  (bookmark-insert-annotation bookmark-name-or-record)
   (bookmark-edit-annotation-mode)
+  (bookmark-insert-annotation bookmark-name-or-record)
   (setq bookmark--annotation-from-bookmark-list from-bookmark-list)
   (setq bookmark-annotation-name bookmark-name-or-record))