diff options
| -rw-r--r-- | lisp/lazy-lock.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/lazy-lock.el b/lisp/lazy-lock.el index 60cb125960a..11303dfbd92 100644 --- a/lisp/lazy-lock.el +++ b/lisp/lazy-lock.el | |||
| @@ -278,13 +278,17 @@ | |||
| 278 | (defmacro save-buffer-state (varlist &rest body) | 278 | (defmacro save-buffer-state (varlist &rest body) |
| 279 | "Bind variables according to VARLIST and eval BODY restoring buffer state." | 279 | "Bind variables according to VARLIST and eval BODY restoring buffer state." |
| 280 | `(let* (,@(append varlist | 280 | `(let* (,@(append varlist |
| 281 | '((modified (buffer-modified-p)) (buffer-undo-list t) | 281 | '((modified (buffer-modified-p)) |
| 282 | (inhibit-read-only t) (inhibit-point-motion-hooks t) | 282 | (buffer-undo-list t) |
| 283 | before-change-functions after-change-functions | 283 | (inhibit-read-only t) |
| 284 | deactivate-mark buffer-file-name buffer-file-truename))) | 284 | (inhibit-point-motion-hooks t) |
| 285 | (inhibit-modification-hooks t) | ||
| 286 | deactivate-mark | ||
| 287 | buffer-file-name | ||
| 288 | buffer-file-truename))) | ||
| 285 | ,@body | 289 | ,@body |
| 286 | (when (and (not modified) (buffer-modified-p)) | 290 | (when (and (not modified) (buffer-modified-p)) |
| 287 | (set-buffer-modified-p nil)))) | 291 | (restore-buffer-modified-p nil)))) |
| 288 | (put 'save-buffer-state 'lisp-indent-function 1) | 292 | (put 'save-buffer-state 'lisp-indent-function 1) |
| 289 | ;; | 293 | ;; |
| 290 | ;; We use this for clarity and speed. Naughty but nice. | 294 | ;; We use this for clarity and speed. Naughty but nice. |