* 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)
"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
(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))