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

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

[nongnu] elpa/crux 225b5e3 042/112: Merge pull request #29 from Wilfred/


From: ELPA Syncer
Subject: [nongnu] elpa/crux 225b5e3 042/112: Merge pull request #29 from Wilfred/rename_file_and_buffer_tweaks
Date: Wed, 11 Aug 2021 09:57:50 -0400 (EDT)

branch: elpa/crux
commit 225b5e31a3a2aa0346e29b1752937312a17216c6
Merge: 6d11d2e 1967a75
Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>

    Merge pull request #29 from Wilfred/rename_file_and_buffer_tweaks
    
    Increase flexibility for inputs to crux-rename-file-and-buffer
---
 crux.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/crux.el b/crux.el
index e88bc0c..ff88d40 100644
--- a/crux.el
+++ b/crux.el
@@ -232,7 +232,9 @@ point reaches the beginning or end of the buffer, stop 
there."
   (let ((filename (buffer-file-name)))
     (if (not (and filename (file-exists-p filename)))
         (rename-buffer (read-from-minibuffer "New name: " (buffer-name)))
-      (let ((new-name (read-file-name "New name: " filename)))
+      (let* ((new-name (read-from-minibuffer "New name: " filename))
+             (containing-dir (file-name-directory new-name)))
+        (make-directory containing-dir t)
         (cond
          ((vc-backend filename) (vc-rename-file filename new-name))
          (t



reply via email to

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