diff options
| author | Stefan Monnier | 2009-02-14 21:41:26 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-02-14 21:41:26 +0000 |
| commit | 002645bd38add90d74507ef0e50d44b3ec641952 (patch) | |
| tree | 138eab8a134f9df28c94592695f42ca70b0cd3a8 | |
| parent | e966384d2030fc2d57d8bbdf91cb1e95240a4bf8 (diff) | |
| download | emacs-002645bd38add90d74507ef0e50d44b3ec641952.tar.gz emacs-002645bd38add90d74507ef0e50d44b3ec641952.zip | |
(with-buffer-prepared-for-jit-lock): Swap the `let' and
the `with-buffer-unmodified' to avoid useless `readlink' calls.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/jit-lock.el | 20 |
2 files changed, 18 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cf008053348..7d7d253fc24 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-02-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * jit-lock.el (with-buffer-prepared-for-jit-lock): Swap the `let' and | ||
| 4 | the `with-buffer-unmodified' to avoid useless `readlink' calls. | ||
| 5 | |||
| 1 | 2009-02-14 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> | 6 | 2009-02-14 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> |
| 2 | 7 | ||
| 3 | * textmodes/bibtex.el (bibtex-global-key-alist) | 8 | * textmodes/bibtex.el (bibtex-global-key-alist) |
| @@ -18,8 +23,8 @@ | |||
| 18 | around forms that refer to translation-table-for-input. | 23 | around forms that refer to translation-table-for-input. |
| 19 | 24 | ||
| 20 | * international/quail.el (quail-input-string-to-events) | 25 | * international/quail.el (quail-input-string-to-events) |
| 21 | (quail-store-decode-map-key, quail-char-equal-p): Use | 26 | (quail-store-decode-map-key, quail-char-equal-p): |
| 22 | `with-no-warnings' around forms that refer to | 27 | Use `with-no-warnings' around forms that refer to |
| 23 | translation-table-for-input. | 28 | translation-table-for-input. |
| 24 | 29 | ||
| 25 | * simple.el (quoted-insert, zap-to-char): Use `with-no-warnings' | 30 | * simple.el (quoted-insert, zap-to-char): Use `with-no-warnings' |
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 @@ | |||
| 45 | "Execute BODY in current buffer, overriding several variables. | 45 | "Execute BODY in current buffer, overriding several variables. |
| 46 | Preserves the `buffer-modified-p' state of the current buffer." | 46 | Preserves the `buffer-modified-p' state of the current buffer." |
| 47 | (declare (debug t)) | 47 | (declare (debug t)) |
| 48 | `(with-buffer-unmodified | 48 | `(let ((buffer-undo-list t) |
| 49 | (let ((buffer-undo-list t) | 49 | (inhibit-read-only t) |
| 50 | (inhibit-read-only t) | 50 | (inhibit-point-motion-hooks t) |
| 51 | (inhibit-point-motion-hooks t) | 51 | (inhibit-modification-hooks t) |
| 52 | (inhibit-modification-hooks t) | 52 | deactivate-mark |
| 53 | deactivate-mark | 53 | buffer-file-name |
| 54 | buffer-file-name | 54 | buffer-file-truename) |
| 55 | buffer-file-truename) | 55 | ;; Do reset the modification status from within the let, since |
| 56 | ,@body)))) | 56 | ;; otherwise set-buffer-modified-p may try to unlock the file. |
| 57 | (with-buffer-unmodified | ||
| 58 | ,@body)))) | ||
| 57 | 59 | ||
| 58 | 60 | ||
| 59 | 61 | ||