]> git.eshelyaron.com Git - emacs.git/commit
with-buffer-unmodified-if-unchanged: Tweak the implementation
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 3 May 2022 19:35:47 +0000 (15:35 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 3 May 2022 19:35:47 +0000 (15:35 -0400)
commitb5db5a64435b86de6e5277d1d173c57784783e5e
tree10916f81c997ea3c580a36a65297cfb357b68907
parent8a7db868cc28f933bc2fb2739d122ed11c9ec872
with-buffer-unmodified-if-unchanged: Tweak the implementation

* lisp/emacs-lisp/subr-x.el (with-buffer-unmodified-if-unchanged):
Skip the hash if the buffer was not modified at all.
Use `restore-buffer-modified-p`.
Also mention that it's imperative that the current buffer is preserved.
lisp/emacs-lisp/subr-x.el