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

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

[nongnu] elpa/crux 86cabce 027/112: Merge pull request #10 from waymondo


From: ELPA Syncer
Subject: [nongnu] elpa/crux 86cabce 027/112: Merge pull request #10 from waymondo/file-and-buffer-naming-conventions
Date: Wed, 11 Aug 2021 09:57:47 -0400 (EDT)

branch: elpa/crux
commit 86cabce06b9d6dddab67558824af631a60a7cbc6
Merge: 3c14b4a e6e3221
Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>

    Merge pull request #10 from waymondo/file-and-buffer-naming-conventions
    
    Fix file-and-buffer commands inconsistencies
---
 crux.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/crux.el b/crux.el
index 7dee0e6..46b46e0 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]