changeset 43983:7bb123117932

(save-buffer-state): Bind inhibit-modification-hooks and buffer-file-truename instead of before-change-functions and after-change-functions.
author Richard M. Stallman <rms@gnu.org>
date Mon, 18 Mar 2002 04:29:13 +0000
parents a40fcee55faa
children 477ed75a821b
files lisp/lazy-lock.el
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/lazy-lock.el	Mon Mar 18 04:27:30 2002 +0000
+++ b/lisp/lazy-lock.el	Mon Mar 18 04:29:13 2002 +0000
@@ -278,13 +278,17 @@
  (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)
-                       before-change-functions after-change-functions
-                       deactivate-mark buffer-file-name buffer-file-truename)))
+		   '((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
      (when (and (not modified) (buffer-modified-p))
-       (set-buffer-modified-p nil))))
+       (restore-buffer-modified-p nil))))
  (put 'save-buffer-state 'lisp-indent-function 1)
  ;;
  ;; We use this for clarity and speed.  Naughty but nice.