From 213d6858a267ae3a0b7121db3c00701fe3d48a2f Mon Sep 17 00:00:00 2001 From: Andreas Politz Date: Mon, 22 Oct 2018 18:33:27 +0200 Subject: Insert contents before setting up the major-mode --- lisp/pdf-annot.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/pdf-annot.el b/lisp/pdf-annot.el index 969bc3a..7f39b44 100644 --- a/lisp/pdf-annot.el +++ b/lisp/pdf-annot.el @@ -1473,13 +1473,13 @@ annotation's contents and otherwise `text-mode'. " (pdf-annot-edit-contents-minor-mode 1) (current-buffer)))) (with-current-buffer pdf-annot-edit-contents--buffer - (setq pdf-annot-edit-contents--annotation a) - (funcall pdf-annot-edit-contents-setup-function a) (let ((inhibit-read-only t)) (erase-buffer) (save-excursion (insert (pdf-annot-get a 'contents))) - (set-buffer-modified-p nil) - (current-buffer))))) + (set-buffer-modified-p nil)) + (setq pdf-annot-edit-contents--annotation a) + (funcall pdf-annot-edit-contents-setup-function a) + (current-buffer)))) (defun pdf-annot-edit-contents (a) (select-window -- cgit v1.0