]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/filet.el: Minor tweaks
authorEshel Yaron <me@eshelyaron.com>
Sat, 26 Oct 2024 06:23:17 +0000 (08:23 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 26 Oct 2024 06:23:17 +0000 (08:23 +0200)
lisp/filet.el

index b343e1761cb3f532fe78b25e3395b67f88e307b5..24ad6f2c6a23d1830226fa76ffb92284fe4af7d8 100644 (file)
@@ -94,20 +94,20 @@ OP-NAME is a string describing the current operation, such as \"Copy\"."
 (defun filet-copy (files directory)
   "Copy FILES to DIRECTORY."
   (interactive (filet-args "Copy"))
-  (filet-create-files #'copy-file
-                      "Copy" files directory dired-keep-marker-copy))
+  (filet-create-files
+   #'copy-file "Copy" files directory dired-keep-marker-copy))
 
 (defun filet-move (files directory)
   "Move FILES to DIRECTORY."
   (interactive (filet-args "Move"))
-  (filet-create-files #'rename-file
-                      "Move" files directory dired-keep-marker-rename))
+  (filet-create-files
+   #'rename-file "Move" files directory dired-keep-marker-rename))
 
 (defun filet-link (files directory)
   "Create symlinks to FILES in DIRECTORY."
   (interactive (filet-args "Link"))
-  (filet-create-files #'make-symbolic-link
-                      "Link" files directory dired-keep-marker-symlink))
+  (filet-create-files
+   #'make-symbolic-link "Link" files directory dired-keep-marker-symlink))
 
 (defun filet-make-relative-symbolic-link (file new ok-flag)
   "Create a relative symbolic link to FILE at NEW.
@@ -119,8 +119,9 @@ OK-FLAG says whether it is OK to override an existing NEW file."
 (defun filet-relk (files directory)
   "Create relative symlinks to FILES in DIRECTORY."
   (interactive (filet-args "Relk"))
-  (filet-create-files #'filet-make-relative-symbolic-link
-                      "Relk" files directory dired-keep-marker-relsymlink))
+  (filet-create-files
+   #'filet-make-relative-symbolic-link "Relk" files directory
+   dired-keep-marker-relsymlink))
 
 ;;;###autoload
 (transient-define-prefix filet ()
@@ -133,9 +134,9 @@ files to that directory."
                                     (abbreviate-file-name
                                      (expand-file-name default-directory))))
     ("-f" "Files" "--files"
-     :class transient-option
-     :multi-value rest
-     :reader filet-read-files)
+     :class transient-option :multi-value rest :reader filet-read-files
+     ;; Align value with the next line.
+     :format " %k %d     (%v)")
     ("-d" "Directory" "--directory=")]
   ["Actions"
    [("c" "Copy" filet-copy)]
@@ -148,7 +149,7 @@ files to that directory."
    (append
     (let ((files nil) (ring kill-ring))
       (while (and ring (not files))
-        (setq files (ignore-errors (split-string-and-unquote (car ring)))
+        (setq files (ignore-errors (split-string-and-unquote (car ring) "[\n\t ]+"))
               ring  (cdr ring))
         (unless (seq-every-p #'file-name-absolute-p files)
           (setq files nil)))