aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2003-06-10 04:03:03 +0000
committerLuc Teirlinck2003-06-10 04:03:03 +0000
commit147e214c5b3034eac2757f0adaa48cc3d6d6370b (patch)
treedbf5998a273b686a991215685d7dd2c528a8966c
parent981643e2eefc19ed0b91fc902ceeb9a5221f5e96 (diff)
downloademacs-147e214c5b3034eac2757f0adaa48cc3d6d6370b.tar.gz
emacs-147e214c5b3034eac2757f0adaa48cc3d6d6370b.zip
(dired-re-dot): Make it handle trailing /.
(dired-get-filename): Update documentation string. Revert previous change and fix typo in earlier version.
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/dired.el17
2 files changed, 11 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2ac1c0f30e5..88cf2054284 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -6,7 +6,7 @@
6 6
7 * dired.el (dired-re-dot): Make it handle trailing /. 7 * dired.el (dired-re-dot): Make it handle trailing /.
8 (dired-get-filename): Update documentation string. 8 (dired-get-filename): Update documentation string.
9 Revert previous change and fix typo in earlier version.. 9 Revert previous change and fix typo in earlier version.
10 10
112003-06-10 Kim F. Storm <storm@cua.dk> 112003-06-10 Kim F. Storm <storm@cua.dk>
12 12
diff --git a/lisp/dired.el b/lisp/dired.el
index 3aae474a118..78826a14657 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -253,7 +253,7 @@ The directory name must be absolute, but need not be fully expanded.")
253 "-[-r][-w].[-r][-w].[-r][-w][xst]") 253 "-[-r][-w].[-r][-w].[-r][-w][xst]")
254 "\\|")) 254 "\\|"))
255(defvar dired-re-perms "[-bcdlps][-r][-w].[-r][-w].[-r][-w].") 255(defvar dired-re-perms "[-bcdlps][-r][-w].[-r][-w].[-r][-w].")
256(defvar dired-re-dot "^.* \\.\\.?$") 256(defvar dired-re-dot "^.* \\.\\.?/?$")
257 257
258;; The subdirectory names in this list are expanded. 258;; The subdirectory names in this list are expanded.
259(defvar dired-subdir-alist nil 259(defvar dired-subdir-alist nil
@@ -1448,11 +1448,12 @@ see `dired-view-command-alist'. Otherwise, display it in another buffer."
1448 "In Dired, return name of file mentioned on this line. 1448 "In Dired, return name of file mentioned on this line.
1449Value returned normally includes the directory name. 1449Value returned normally includes the directory name.
1450Optional arg LOCALP with value `no-dir' means don't include directory 1450Optional arg LOCALP with value `no-dir' means don't include directory
1451 name in result. A value of `verbatim' means to return the name exactly as 1451name in result. A value of `verbatim' means to return the name exactly as
1452 it occurs in the buffer, and a value of t means construct name relative to 1452it occurs in the buffer, and a value of t means construct name relative to
1453 `default-directory', which still may contain slashes if in a subdirectory. 1453`default-directory', which still may contain slashes if in a subdirectory.
1454Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on 1454Optional arg NO-ERROR-IF-NOT-FILEP means treat `.' and `..' as
1455 this line, otherwise an error occurs." 1455regular filenames and return nil if no filename on this line.
1456Otherwise, an error occurs in these cases."
1456 (let (case-fold-search file p1 p2 already-absolute) 1457 (let (case-fold-search file p1 p2 already-absolute)
1457 (save-excursion 1458 (save-excursion
1458 (if (setq p1 (dired-move-to-filename (not no-error-if-not-filep))) 1459 (if (setq p1 (dired-move-to-filename (not no-error-if-not-filep)))
@@ -1490,7 +1491,9 @@ Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on
1490 ((eq localp 'verbatim) 1491 ((eq localp 'verbatim)
1491 file) 1492 file)
1492 ((and (not no-error-if-not-filep) 1493 ((and (not no-error-if-not-filep)
1493 (member (file-name-nondirectory file) '("." ".."))) 1494 (save-excursion
1495 (beginning-of-line)
1496 (looking-at dired-re-dot)))
1494 (error "Cannot operate on `.' or `..'")) 1497 (error "Cannot operate on `.' or `..'"))
1495 ((and (eq localp 'no-dir) already-absolute) 1498 ((and (eq localp 'no-dir) already-absolute)
1496 (file-name-nondirectory file)) 1499 (file-name-nondirectory file))