fix spacemacs/rename-file function
It has some wrong variable names which leads to errors.
This commit is contained in:
parent
074ac8f756
commit
2570a1340b
|
@ -298,14 +298,14 @@ projectile cache when it's possible and update recentf list."
|
||||||
(rename-file filename new-name 1)
|
(rename-file filename new-name 1)
|
||||||
(when buffer
|
(when buffer
|
||||||
(kill-buffer buffer)
|
(kill-buffer buffer)
|
||||||
(find-file newfile))
|
(find-file new-name))
|
||||||
(when (fboundp 'recentf-add-file)
|
(when (fboundp 'recentf-add-file)
|
||||||
(recentf-add-file new-name)
|
(recentf-add-file new-name)
|
||||||
(recentf-remove-if-non-kept filename))
|
(recentf-remove-if-non-kept filename))
|
||||||
(when (and (configuration-layer/package-usedp 'projectile)
|
(when (and (configuration-layer/package-usedp 'projectile)
|
||||||
(projectile-project-p))
|
(projectile-project-p))
|
||||||
(call-interactively #'projectile-invalidate-cache))
|
(call-interactively #'projectile-invalidate-cache))
|
||||||
(message "File '%s' successfully renamed to '%s'" name (file-name-nondirectory new-name)))))))
|
(message "File '%s' successfully renamed to '%s'" short-name (file-name-nondirectory new-name)))))))
|
||||||
|
|
||||||
;; from magnars
|
;; from magnars
|
||||||
(defun spacemacs/rename-current-buffer-file ()
|
(defun spacemacs/rename-current-buffer-file ()
|
||||||
|
|
Loading…
Reference in a new issue