Update recentf after file renaming

Delete old filename from a list and append a new one.
This commit is contained in:
Igor Avdeev 2016-02-01 01:29:50 +03:00 committed by syl20bnr
parent 42735c9f9f
commit 41284a740b
1 changed files with 3 additions and 0 deletions

View File

@ -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