]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove unecessary unlock-buffer calls
authorMatt Armstrong <matt@rfc20.org>
Tue, 23 Feb 2021 00:40:05 +0000 (16:40 -0800)
committerEli Zaretskii <eliz@gnu.org>
Sat, 27 Feb 2021 14:19:37 +0000 (16:19 +0200)
* lisp/files.el (revert-buffer-insert-file-contents--default-function):
Remove vestigial call to `unlock-buffer'.
* lisp/simple.el (primitive-undo): Assume unlock-buffer is always
bound.  (Bug#46701)

lisp/files.el
lisp/simple.el

index 68894ca2ce01052989434ed76552169f30be4ada..e5fa1d8b2243d7b72460ffed3e7ed8bd104ce4bf 100644 (file)
@@ -6235,11 +6235,6 @@ an auto-save file."
              "Cannot revert unreadable file %s")
            file-name))
    (t
-    ;; Bind buffer-file-name to nil
-    ;; so that we don't try to lock the file.
-    (let ((buffer-file-name nil))
-      (or auto-save-p
-          (unlock-buffer)))
     (widen)
     (let ((coding-system-for-read
            ;; Auto-saved file should be read by Emacs's
index 403861351c9b0a24e7b685b8778f96b69fedf449..f8050091d589c7feacea059a560fcd698d0e3f44 100644 (file)
@@ -3043,8 +3043,7 @@ Return what remains of the list."
                      (and (consp time)
                           (equal (list (car time) (cdr time))
                                  (visited-file-modtime))))
-             (when (fboundp 'unlock-buffer)
-               (unlock-buffer))
+             (unlock-buffer)
              (set-buffer-modified-p nil)))
           ;; Element (nil PROP VAL BEG . END) is property change.
           (`(nil . ,(or `(,prop ,val ,beg . ,end) pcase--dontcare))