branch: elpa/crux commit e6e3221f9f0a39945ae949266904369a9cbf4443 Author: justin talbott <jus...@waymondo.com> Commit: justin talbott <jus...@waymondo.com>
Fix crux-*-file-and-buffer commands inconsistencies and alias the inverse `(crux-rename-file-and-buffer)` was incorrectly labeled in the README so I updated the name and created aliases for the other way to name the same commands. --- crux.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crux.el b/crux.el index 8a13173..5abfceb 100644 --- a/crux.el +++ b/crux.el @@ -188,7 +188,7 @@ point reaches the beginning or end of the buffer, stop there." (setq end (line-end-position)) (cons beg end))) -(defun crux-rename-buffer-and-file () +(defun crux-rename-file-and-buffer () "Rename current buffer and if the buffer is visiting a file, rename it too." (interactive) (let ((filename (buffer-file-name))) @@ -201,6 +201,8 @@ point reaches the beginning or end of the buffer, stop there." (rename-file filename new-name t) (set-visited-file-name new-name t t))))))) +(defalias 'crux-rename-buffer-and-file #'crux-rename-file-and-buffer) + (defun crux-delete-file-and-buffer () "Kill the current buffer and deletes the file it is visiting." (interactive) @@ -213,6 +215,8 @@ point reaches the beginning or end of the buffer, stop there." (message "Deleted file %s" filename) (kill-buffer)))))) +(defalias 'crux-delete-buffer-and-file #'crux-delete-file-and-buffer) + (defun crux-view-url () "Open a new buffer containing the contents of URL." (interactive)