Make with-buffer-unmodified-if-unchanged more efficient
* lisp/emacs-lisp/subr-x.el (with-buffer-unmodified-if-unchanged): Make more efficient.
This commit is contained in:
parent
b7ddd0f2fd
commit
0a2f0e7f8c
1 changed files with 2 additions and 2 deletions
|
@ -439,9 +439,9 @@ modification status:
|
|||
;; If we didn't change anything in the buffer (and the buffer
|
||||
;; was previously unmodified), then flip the modification status
|
||||
;; back to "unchanged".
|
||||
(when (buffer-live-p ,buffer)
|
||||
(when (and ,hash (buffer-live-p ,buffer))
|
||||
(with-current-buffer ,buffer
|
||||
(when (and ,hash (buffer-modified-p)
|
||||
(when (and (buffer-modified-p)
|
||||
(equal ,hash (buffer-hash)))
|
||||
(restore-buffer-modified-p nil))))))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue