Mercurial > emacs
changeset 51498:031a70df49c9
(dired-get-filename): Don't err for . and .. for calls from dired-add-entry.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Thu, 05 Jun 2003 22:00:13 +0000 |
parents | bd8689acb25b |
children | 4addbb67f0bb |
files | lisp/dired.el |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/dired.el Thu Jun 05 20:07:16 2003 +0000 +++ b/lisp/dired.el Thu Jun 05 22:00:13 2003 +0000 @@ -1367,7 +1367,7 @@ (defun dired-find-file () "In Dired, visit the file or directory named on this line." (interactive) - ;; Bind `find-file-run-dired' so that the command works on directories + ;; Bind `find-file-run-dired' so that the command works on directories ;; too, independent of the user's setting. (let ((find-file-run-dired t)) (find-file (dired-get-file-for-visit)))) @@ -1487,13 +1487,13 @@ (cond ((null file) nil) + ((eq localp 'verbatim) + file) ((and (not no-error-if-not-filep) (save-excursion (beginning-of-line) (looking-at dired-re-dir))) (error "Cannot operate on `.' or `..'")) - ((eq localp 'verbatim) - file) ((and (eq localp 'no-dir) already-absolute) (file-name-nondirectory file)) (already-absolute @@ -1519,7 +1519,7 @@ (concat (dired-current-directory localp) file))))) (defun dired-string-replace-match (regexp string newtext - &optional literal global) + &optional literal global) "Replace first match of REGEXP in STRING with NEWTEXT. If it does not match, nil is returned instead of the new string. Optional arg LITERAL means to take NEWTEXT literally.