From 7b7a23f49bd7b7977cc13319c6c3683bbdb31ea7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 29 Mar 2002 13:31:19 +0000 Subject: [PATCH] (save-buffer-state): Use make-symbol to bind `modified'. --- lisp/font-lock.el | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 308a3e2789c..5aa8f246b89 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -677,14 +677,20 @@ Major/minor modes can set this variable if they know which option applies.") ;; We use this to preserve or protect things when modifying text properties. (defmacro save-buffer-state (varlist &rest body) "Bind variables according to VARLIST and eval BODY restoring buffer state." - `(let* ,(append varlist - '((modified (buffer-modified-p)) (buffer-undo-list t) - (inhibit-read-only t) (inhibit-point-motion-hooks t) - (inhibit-modification-hooks t) - deactivate-mark buffer-file-name buffer-file-truename)) - ,@body - (unless modified - (restore-buffer-modified-p nil)))) + (let ((modified (make-symbol "modified"))) + `(let* ,(append varlist + '((,modified (buffer-modified-p)) + (buffer-undo-list t) + (inhibit-read-only t) + (inhibit-point-motion-hooks t) + (inhibit-modification-hooks t) + deactivate-mark + buffer-file-name + buffer-file-truename)) + (progn + ,@body) + (unless ,modified + (restore-buffer-modified-p nil))))) (put 'save-buffer-state 'lisp-indent-function 1) (def-edebug-spec save-buffer-state let) ;;