remember-data-file: Don't unconditionally call set-visited-file-name
* lisp/textmodes/remember.el (remember-data-file): Don't unconditionally call set-visited-file-name.
This commit is contained in:
parent
7766ba8419
commit
794bb2a2e3
1 changed files with 9 additions and 2 deletions
|
@ -378,8 +378,15 @@ exists) might be changed."
|
||||||
(set-default symbol value)
|
(set-default symbol value)
|
||||||
(when (buffer-live-p buf)
|
(when (buffer-live-p buf)
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
(set-visited-file-name
|
;; Don't unconditionally call `set-visited-file-name'
|
||||||
(expand-file-name remember-data-file))))))
|
;; because that will probably change the major mode and
|
||||||
|
;; rename the buffer.
|
||||||
|
;; These must be avoided in the case where
|
||||||
|
;; `remember-notes-buffer-name' is "*scratch*", a
|
||||||
|
;; supported configuration.
|
||||||
|
(let ((value (expand-file-name value)))
|
||||||
|
(unless (string= buffer-file-name value)
|
||||||
|
(set-visited-file-name value)))))))
|
||||||
:initialize #'custom-initialize-default)
|
:initialize #'custom-initialize-default)
|
||||||
|
|
||||||
(defcustom remember-leader-text "** "
|
(defcustom remember-leader-text "** "
|
||||||
|
|
Loading…
Add table
Reference in a new issue