Mercurial > emacs
changeset 44229:8c0a16af093a
(save-buffer-state): Use make-symbol to bind `modified'.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 29 Mar 2002 13:31:19 +0000 |
parents | 8dcac1c05e8e |
children | 3f6a213458ad |
files | lisp/font-lock.el |
diffstat | 1 files changed, 14 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/font-lock.el Fri Mar 29 12:48:09 2002 +0000 +++ b/lisp/font-lock.el Fri Mar 29 13:31:19 2002 +0000 @@ -677,14 +677,20 @@ ;; 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) ;;