Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
54df7d9a
Commit
54df7d9a
authored
Apr 13, 1997
by
Richard M. Stallman
Browse files
(dired-noselect): Avoid calling file-directory-p
when the initial argument was syntactically a directory name.
parent
ded3e3d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
lisp/dired.el
lisp/dired.el
+11
-3
No files found.
lisp/dired.el
View file @
54df7d9a
...
...
@@ -410,16 +410,24 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh."
(or dir-or-list (setq dir-or-list default-directory))
;; This loses the distinction between "
/foo/*/
" and "
/foo/*
" that
;; some shells make:
(let (dirname)
(let (dirname
initially-was-dirname
)
(if (consp dir-or-list)
(setq dirname (car dir-or-list))
(setq dirname dir-or-list))
(setq initially-was-dirname
(string= (file-name-as-directory dirname) dirname))
(setq dirname (abbreviate-file-name
(expand-file-name (directory-file-name dirname))))
(if find-file-visit-truename
(setq dirname (file-truename dirname)))
(if (file-directory-p dirname)
(setq dirname (file-name-as-directory dirname)))
;; If the argument was syntactically a directory name not a file name,
;; or if it happens to name a file that is a directory,
;; convert it syntactically to a directory name.
;; The reason for checking initially-was-dirname
;; and not just file-directory-p
;; is that file-directory-p is slow over ftp.
(if (or initially-was-dirname (file-directory-p dirname))
(setq dirname (file-name-as-directory dirname)))
(if (consp dir-or-list)
(setq dir-or-list (cons dirname (cdr dir-or-list)))
(setq dir-or-list dirname))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment