diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-02-14 21:41:26 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-02-14 21:41:26 +0000 |
commit | 002645bd38add90d74507ef0e50d44b3ec641952 (patch) | |
tree | 138eab8a134f9df28c94592695f42ca70b0cd3a8 /lisp/jit-lock.el | |
parent | e966384d2030fc2d57d8bbdf91cb1e95240a4bf8 (diff) | |
download | emacs-002645bd38add90d74507ef0e50d44b3ec641952.tar.gz |
(with-buffer-prepared-for-jit-lock): Swap the `let' and
the `with-buffer-unmodified' to avoid useless `readlink' calls.
Diffstat (limited to 'lisp/jit-lock.el')
-rw-r--r-- | lisp/jit-lock.el | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index 384771e4f25..786d2b16c48 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -45,15 +45,17 @@ "Execute BODY in current buffer, overriding several variables. Preserves the `buffer-modified-p' state of the current buffer." (declare (debug t)) - `(with-buffer-unmodified - (let ((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)))) + `(let ((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) + ;; Do reset the modification status from within the let, since + ;; otherwise set-buffer-modified-p may try to unlock the file. + (with-buffer-unmodified + ,@body)))) |