diff options
| author | Juanma Barranquero | 2003-06-05 22:00:13 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2003-06-05 22:00:13 +0000 |
| commit | 1d5ad120aa6e320f6d8d62409ae9557d8d09b84d (patch) | |
| tree | 9ffb6e74c1b42eb7a8d870417779152caef6d1d8 | |
| parent | e99add213b5dec56a1eba522937a979e91245b49 (diff) | |
| download | emacs-1d5ad120aa6e320f6d8d62409ae9557d8d09b84d.tar.gz emacs-1d5ad120aa6e320f6d8d62409ae9557d8d09b84d.zip | |
(dired-get-filename): Don't err for . and .. for calls from dired-add-entry.
| -rw-r--r-- | lisp/dired.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/dired.el b/lisp/dired.el index 02841adcb13..db66f78d71d 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -1367,7 +1367,7 @@ Creates a buffer if necessary." | |||
| 1367 | (defun dired-find-file () | 1367 | (defun dired-find-file () |
| 1368 | "In Dired, visit the file or directory named on this line." | 1368 | "In Dired, visit the file or directory named on this line." |
| 1369 | (interactive) | 1369 | (interactive) |
| 1370 | ;; Bind `find-file-run-dired' so that the command works on directories | 1370 | ;; Bind `find-file-run-dired' so that the command works on directories |
| 1371 | ;; too, independent of the user's setting. | 1371 | ;; too, independent of the user's setting. |
| 1372 | (let ((find-file-run-dired t)) | 1372 | (let ((find-file-run-dired t)) |
| 1373 | (find-file (dired-get-file-for-visit)))) | 1373 | (find-file (dired-get-file-for-visit)))) |
| @@ -1487,13 +1487,13 @@ Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on | |||
| 1487 | (cond | 1487 | (cond |
| 1488 | ((null file) | 1488 | ((null file) |
| 1489 | nil) | 1489 | nil) |
| 1490 | ((eq localp 'verbatim) | ||
| 1491 | file) | ||
| 1490 | ((and (not no-error-if-not-filep) | 1492 | ((and (not no-error-if-not-filep) |
| 1491 | (save-excursion | 1493 | (save-excursion |
| 1492 | (beginning-of-line) | 1494 | (beginning-of-line) |
| 1493 | (looking-at dired-re-dir))) | 1495 | (looking-at dired-re-dir))) |
| 1494 | (error "Cannot operate on `.' or `..'")) | 1496 | (error "Cannot operate on `.' or `..'")) |
| 1495 | ((eq localp 'verbatim) | ||
| 1496 | file) | ||
| 1497 | ((and (eq localp 'no-dir) already-absolute) | 1497 | ((and (eq localp 'no-dir) already-absolute) |
| 1498 | (file-name-nondirectory file)) | 1498 | (file-name-nondirectory file)) |
| 1499 | (already-absolute | 1499 | (already-absolute |
| @@ -1519,7 +1519,7 @@ Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on | |||
| 1519 | (concat (dired-current-directory localp) file))))) | 1519 | (concat (dired-current-directory localp) file))))) |
| 1520 | 1520 | ||
| 1521 | (defun dired-string-replace-match (regexp string newtext | 1521 | (defun dired-string-replace-match (regexp string newtext |
| 1522 | &optional literal global) | 1522 | &optional literal global) |
| 1523 | "Replace first match of REGEXP in STRING with NEWTEXT. | 1523 | "Replace first match of REGEXP in STRING with NEWTEXT. |
| 1524 | If it does not match, nil is returned instead of the new string. | 1524 | If it does not match, nil is returned instead of the new string. |
| 1525 | Optional arg LITERAL means to take NEWTEXT literally. | 1525 | Optional arg LITERAL means to take NEWTEXT literally. |