aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2003-01-14 23:11:42 +0000
committerKim F. Storm2003-01-14 23:11:42 +0000
commit731ffbd94b4ed8f3be33070e09fcd183fb6687b4 (patch)
treed54dae550dc8ad9f44b668e98076e61c8eb70b4d
parent470fa6d1a1e88da01337266497d25594b8a1dd5a (diff)
downloademacs-731ffbd94b4ed8f3be33070e09fcd183fb6687b4.tar.gz
emacs-731ffbd94b4ed8f3be33070e09fcd183fb6687b4.zip
Rename `whole-path' to `whole-name' throughout.
(dired-mark-read-regexp): Use "Abs." prefix instead of "Path".
-rw-r--r--lisp/dired-aux.el36
1 files changed, 18 insertions, 18 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 09ad9f9a677..70e14730bd3 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1417,13 +1417,13 @@ of `dired-dwim-target', which see."
1417;;; 5K 1417;;; 5K
1418;;;###begin dired-re.el 1418;;;###begin dired-re.el
1419(defun dired-do-create-files-regexp 1419(defun dired-do-create-files-regexp
1420 (file-creator operation arg regexp newname &optional whole-path marker-char) 1420 (file-creator operation arg regexp newname &optional whole-name marker-char)
1421 ;; Create a new file for each marked file using regexps. 1421 ;; Create a new file for each marked file using regexps.
1422 ;; FILE-CREATOR and OPERATION as in dired-create-files. 1422 ;; FILE-CREATOR and OPERATION as in dired-create-files.
1423 ;; ARG as in dired-get-marked-files. 1423 ;; ARG as in dired-get-marked-files.
1424 ;; Matches each marked file against REGEXP and constructs the new 1424 ;; Matches each marked file against REGEXP and constructs the new
1425 ;; filename from NEWNAME (like in function replace-match). 1425 ;; filename from NEWNAME (like in function replace-match).
1426 ;; Optional arg WHOLE-PATH means match/replace the whole file name 1426 ;; Optional arg WHOLE-NAME means match/replace the whole file name
1427 ;; instead of only the non-directory part of the file. 1427 ;; instead of only the non-directory part of the file.
1428 ;; Optional arg MARKER-CHAR as in dired-create-files. 1428 ;; Optional arg MARKER-CHAR as in dired-create-files.
1429 (let* ((fn-list (dired-get-marked-files nil arg)) 1429 (let* ((fn-list (dired-get-marked-files nil arg))
@@ -1436,7 +1436,7 @@ Type SPC or `y' to %s one match, DEL or `n' to skip to next,
1436 (downcase operation))) 1436 (downcase operation)))
1437 (regexp-name-constructor 1437 (regexp-name-constructor
1438 ;; Function to construct new filename using REGEXP and NEWNAME: 1438 ;; Function to construct new filename using REGEXP and NEWNAME:
1439 (if whole-path ; easy (but rare) case 1439 (if whole-name ; easy (but rare) case
1440 (function 1440 (function
1441 (lambda (from) 1441 (lambda (from)
1442 (let ((to (dired-string-replace-match regexp from newname)) 1442 (let ((to (dired-string-replace-match regexp from newname))
@@ -1451,7 +1451,7 @@ Type SPC or `y' to %s one match, DEL or `n' to skip to next,
1451 to) 1451 to)
1452 (dired-log "%s: %s did not match regexp %s\n" 1452 (dired-log "%s: %s did not match regexp %s\n"
1453 operation from regexp))))) 1453 operation from regexp)))))
1454 ;; not whole-path, replace non-directory part only 1454 ;; not whole-name, replace non-directory part only
1455 (function 1455 (function
1456 (lambda (from) 1456 (lambda (from)
1457 (let* ((new (dired-string-replace-match 1457 (let* ((new (dired-string-replace-match
@@ -1474,21 +1474,21 @@ Type SPC or `y' to %s one match, DEL or `n' to skip to next,
1474 1474
1475(defun dired-mark-read-regexp (operation) 1475(defun dired-mark-read-regexp (operation)
1476 ;; Prompt user about performing OPERATION. 1476 ;; Prompt user about performing OPERATION.
1477 ;; Read and return list of: regexp newname arg whole-path. 1477 ;; Read and return list of: regexp newname arg whole-name.
1478 (let* ((whole-path 1478 (let* ((whole-name
1479 (equal 0 (prefix-numeric-value current-prefix-arg))) 1479 (equal 0 (prefix-numeric-value current-prefix-arg)))
1480 (arg 1480 (arg
1481 (if whole-path nil current-prefix-arg)) 1481 (if whole-name nil current-prefix-arg))
1482 (regexp 1482 (regexp
1483 (dired-read-regexp 1483 (dired-read-regexp
1484 (concat (if whole-path "Path " "") operation " from (regexp): "))) 1484 (concat (if whole-name "Abs. " "") operation " from (regexp): ")))
1485 (newname 1485 (newname
1486 (read-string 1486 (read-string
1487 (concat (if whole-path "Path " "") operation " " regexp " to: ")))) 1487 (concat (if whole-name "Abs. " "") operation " " regexp " to: "))))
1488 (list regexp newname arg whole-path))) 1488 (list regexp newname arg whole-name)))
1489 1489
1490;;;###autoload 1490;;;###autoload
1491(defun dired-do-rename-regexp (regexp newname &optional arg whole-path) 1491(defun dired-do-rename-regexp (regexp newname &optional arg whole-name)
1492 "Rename selected files whose names match REGEXP to NEWNAME. 1492 "Rename selected files whose names match REGEXP to NEWNAME.
1493 1493
1494With non-zero prefix argument ARG, the command operates on the next ARG 1494With non-zero prefix argument ARG, the command operates on the next ARG
@@ -1505,10 +1505,10 @@ Normally, only the non-directory part of the file name is used and changed."
1505 (interactive (dired-mark-read-regexp "Rename")) 1505 (interactive (dired-mark-read-regexp "Rename"))
1506 (dired-do-create-files-regexp 1506 (dired-do-create-files-regexp
1507 (function dired-rename-file) 1507 (function dired-rename-file)
1508 "Rename" arg regexp newname whole-path dired-keep-marker-rename)) 1508 "Rename" arg regexp newname whole-name dired-keep-marker-rename))
1509 1509
1510;;;###autoload 1510;;;###autoload
1511(defun dired-do-copy-regexp (regexp newname &optional arg whole-path) 1511(defun dired-do-copy-regexp (regexp newname &optional arg whole-name)
1512 "Copy selected files whose names match REGEXP to NEWNAME. 1512 "Copy selected files whose names match REGEXP to NEWNAME.
1513See function `dired-do-rename-regexp' for more info." 1513See function `dired-do-rename-regexp' for more info."
1514 (interactive (dired-mark-read-regexp "Copy")) 1514 (interactive (dired-mark-read-regexp "Copy"))
@@ -1516,25 +1516,25 @@ See function `dired-do-rename-regexp' for more info."
1516 (dired-do-create-files-regexp 1516 (dired-do-create-files-regexp
1517 (function dired-copy-file) 1517 (function dired-copy-file)
1518 (if dired-copy-preserve-time "Copy [-p]" "Copy") 1518 (if dired-copy-preserve-time "Copy [-p]" "Copy")
1519 arg regexp newname whole-path dired-keep-marker-copy))) 1519 arg regexp newname whole-name dired-keep-marker-copy)))
1520 1520
1521;;;###autoload 1521;;;###autoload
1522(defun dired-do-hardlink-regexp (regexp newname &optional arg whole-path) 1522(defun dired-do-hardlink-regexp (regexp newname &optional arg whole-name)
1523 "Hardlink selected files whose names match REGEXP to NEWNAME. 1523 "Hardlink selected files whose names match REGEXP to NEWNAME.
1524See function `dired-do-rename-regexp' for more info." 1524See function `dired-do-rename-regexp' for more info."
1525 (interactive (dired-mark-read-regexp "HardLink")) 1525 (interactive (dired-mark-read-regexp "HardLink"))
1526 (dired-do-create-files-regexp 1526 (dired-do-create-files-regexp
1527 (function add-name-to-file) 1527 (function add-name-to-file)
1528 "HardLink" arg regexp newname whole-path dired-keep-marker-hardlink)) 1528 "HardLink" arg regexp newname whole-name dired-keep-marker-hardlink))
1529 1529
1530;;;###autoload 1530;;;###autoload
1531(defun dired-do-symlink-regexp (regexp newname &optional arg whole-path) 1531(defun dired-do-symlink-regexp (regexp newname &optional arg whole-name)
1532 "Symlink selected files whose names match REGEXP to NEWNAME. 1532 "Symlink selected files whose names match REGEXP to NEWNAME.
1533See function `dired-do-rename-regexp' for more info." 1533See function `dired-do-rename-regexp' for more info."
1534 (interactive (dired-mark-read-regexp "SymLink")) 1534 (interactive (dired-mark-read-regexp "SymLink"))
1535 (dired-do-create-files-regexp 1535 (dired-do-create-files-regexp
1536 (function make-symbolic-link) 1536 (function make-symbolic-link)
1537 "SymLink" arg regexp newname whole-path dired-keep-marker-symlink)) 1537 "SymLink" arg regexp newname whole-name dired-keep-marker-symlink))
1538 1538
1539(defun dired-create-files-non-directory 1539(defun dired-create-files-non-directory
1540 (file-creator basename-constructor operation arg) 1540 (file-creator basename-constructor operation arg)