]> git.eshelyaron.com Git - emacs.git/commitdiff
Add an instruction header line to string-edit
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 27 Apr 2022 12:08:49 +0000 (14:08 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 27 Apr 2022 12:08:49 +0000 (14:08 +0200)
* lisp/textmodes/string-edit.el (string-edit): Add a header line
with instructions.

lisp/textmodes/string-edit.el

index 7c3b5702248af0c2ee5694f3b419791a0fe3dd8f..ff8a492401cca5de2e4b5813084751831f963cc1 100644 (file)
@@ -66,6 +66,9 @@ buffer, but won't be included in the resulting string."
   (setq-local string-edit--success-callback success-callback)
   (when abort-callback
     (setq-local string-edit--abort-callback abort-callback))
+  (setq-local header-line-format
+              (substitute-command-keys
+               "Type \\<string-edit-mode-map>\\[string-edit-done] when you've finished editing or \\[string-edit-abort] to abort"))
   (message "%s" (substitute-command-keys
                  "Type \\<string-edit-mode-map>\\[string-edit-done] when you've finished editing")))