emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/crux e6e3221 025/112: Fix crux-*-file-and-buffer commands


From: ELPA Syncer
Subject: [nongnu] elpa/crux e6e3221 025/112: Fix crux-*-file-and-buffer commands inconsistencies and alias the inverse
Date: Wed, 11 Aug 2021 09:57:46 -0400 (EDT)

branch: elpa/crux
commit e6e3221f9f0a39945ae949266904369a9cbf4443
Author: justin talbott <justin@waymondo.com>
Commit: justin talbott <justin@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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]