253 |
"-[-r][-w].[-r][-w].[-r][-w][xst]") |
"-[-r][-w].[-r][-w].[-r][-w][xst]") |
254 |
"\\|")) |
"\\|")) |
255 |
(defvar dired-re-perms "[-bcdlps][-r][-w].[-r][-w].[-r][-w].") |
(defvar dired-re-perms "[-bcdlps][-r][-w].[-r][-w].[-r][-w].") |
256 |
(defvar dired-re-dot "^.* \\.\\.?$") |
(defvar dired-re-dot "^.* \\.\\.?/?$") |
257 |
|
|
258 |
;; The subdirectory names in this list are expanded. |
;; The subdirectory names in this list are expanded. |
259 |
(defvar dired-subdir-alist nil |
(defvar dired-subdir-alist nil |
1448 |
"In Dired, return name of file mentioned on this line. |
"In Dired, return name of file mentioned on this line. |
1449 |
Value returned normally includes the directory name. |
Value returned normally includes the directory name. |
1450 |
Optional arg LOCALP with value `no-dir' means don't include directory |
Optional 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 |
name 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 |
it 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. |
`default-directory', which still may contain slashes if in a subdirectory. |
1454 |
Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on |
Optional arg NO-ERROR-IF-NOT-FILEP means treat `.' and `..' as |
1455 |
this line, otherwise an error occurs." |
regular filenames and return nil if no filename on this line. |
1456 |
|
Otherwise, an error occurs in these cases." |
1457 |
(let (case-fold-search file p1 p2 already-absolute) |
(let (case-fold-search file p1 p2 already-absolute) |
1458 |
(save-excursion |
(save-excursion |
1459 |
(if (setq p1 (dired-move-to-filename (not no-error-if-not-filep))) |
(if (setq p1 (dired-move-to-filename (not no-error-if-not-filep))) |
1491 |
((eq localp 'verbatim) |
((eq localp 'verbatim) |
1492 |
file) |
file) |
1493 |
((and (not no-error-if-not-filep) |
((and (not no-error-if-not-filep) |
1494 |
(member (file-name-nondirectory file) '("." ".."))) |
(save-excursion |
1495 |
|
(beginning-of-line) |
1496 |
|
(looking-at dired-re-dot))) |
1497 |
(error "Cannot operate on `.' or `..'")) |
(error "Cannot operate on `.' or `..'")) |
1498 |
((and (eq localp 'no-dir) already-absolute) |
((and (eq localp 'no-dir) already-absolute) |
1499 |
(file-name-nondirectory file)) |
(file-name-nondirectory file)) |