branch: elpa/pdf-tools
commit 154e31dc3cee2cfdd62e5ff11f17b5addee18f93
Author: Augusto Stoffel <[email protected]>
Commit: Vedang Manerikar <[email protected]>
Display a header line when editing annotation contents
---
lisp/pdf-annot.el | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/lisp/pdf-annot.el b/lisp/pdf-annot.el
index 3b6359342e..abd9814c05 100644
--- a/lisp/pdf-annot.el
+++ b/lisp/pdf-annot.el
@@ -1453,9 +1453,9 @@ annotation's contents and otherwise `org-mode'."
"Active when editing the contents of annotations."
:group 'pdf-annot
(when pdf-annot-edit-contents-minor-mode
- (message "%s"
- (substitute-command-keys
- "Press \\[pdf-annot-edit-contents-commit] to commit your
changes, \\[pdf-annot-edit-contents-abort] to abandon them."))))
+ (setq-local header-line-format
+ (substitute-command-keys "\
+Press \\[pdf-annot-edit-contents-commit] to commit your changes,
\\[pdf-annot-edit-contents-abort] to abandon them."))))
(put 'pdf-annot-edit-contents-minor-mode 'permanent-local t)
@@ -1510,11 +1510,8 @@ At any given point of time, only one annotation can be
in edit mode."
(pdf-annot-edit-contents-finalize 'ask)))
(unless (buffer-live-p pdf-annot-edit-contents--buffer)
(setq pdf-annot-edit-contents--buffer
- (with-current-buffer (get-buffer-create
- (format "*Edit Annotation %s*"
- (buffer-name)))
- (pdf-annot-edit-contents-minor-mode 1)
- (current-buffer))))
+ (get-buffer-create
+ (format "*Edit Annotation %s*" (buffer-name)))))
(with-current-buffer pdf-annot-edit-contents--buffer
(let ((inhibit-read-only t))
(erase-buffer)
@@ -1522,6 +1519,7 @@ At any given point of time, only one annotation can be in
edit mode."
(set-buffer-modified-p nil))
(setq pdf-annot-edit-contents--annotation a)
(funcall pdf-annot-edit-contents-setup-function a)
+ (pdf-annot-edit-contents-minor-mode 1)
(current-buffer))))
(defun pdf-annot-edit-contents (a)