diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/subr-x.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index a416059df62..298d370cb25 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el @@ -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)))))))) |