diff --git a/layers/+distribution/spacemacs-base/funcs.el b/layers/+distribution/spacemacs-base/funcs.el index 8f42b08e5..430a82f8d 100644 --- a/layers/+distribution/spacemacs-base/funcs.el +++ b/layers/+distribution/spacemacs-base/funcs.el @@ -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