Update recentf after file renaming
Delete old filename from a list and append a new one.
This commit is contained in:
parent
42735c9f9f
commit
41284a740b
1 changed files with 3 additions and 0 deletions
|
@ -297,6 +297,9 @@ argument takes the kindows rotate backwards."
|
|||
(rename-buffer new-name)
|
||||
(set-visited-file-name new-name)
|
||||
(set-buffer-modified-p nil)
|
||||
(when (fboundp 'recentf-add-file)
|
||||
(recentf-add-file new-name)
|
||||
(recentf-remove-if-non-kept filename))
|
||||
(message "File '%s' successfully renamed to '%s'" name (file-name-nondirectory new-name))))))))
|
||||
|
||||
;; from magnars
|
||||
|
|
Reference in a new issue