fix spacemacs/rename-file function

It has some wrong variable names which leads to errors.
This commit is contained in:
d12frosted 2016-06-17 21:44:00 +03:00
parent 074ac8f756
commit 2570a1340b
No known key found for this signature in database
GPG key ID: 8D33A3B1A4AF7D30

View file

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