+evil:file-move: don't error if save-place-mode is disabled

This commit is contained in:
Henrik Lissner 2017-04-04 12:30:24 -04:00
parent e1518e2d27
commit 30044533a3

View file

@ -54,7 +54,8 @@
(rename-buffer (file-name-nondirectory new-path)) (rename-buffer (file-name-nondirectory new-path))
(set-visited-file-name new-path) (set-visited-file-name new-path)
(set-buffer-modified-p nil) (set-buffer-modified-p nil)
(save-place-forget-unreadable-files) (when (bound-and-true-p save-place-mode)
(save-place-forget-unreadable-files))
(setq doom--spaceline-file-path nil) (setq doom--spaceline-file-path nil)
(message "File '%s' successfully renamed to '%s'" (message "File '%s' successfully renamed to '%s'"
short-old-path short-new-path)))) short-old-path short-new-path))))