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
a3d76960
Commit
a3d76960
authored
Sep 24, 2006
by
Richard M. Stallman
Browse files
(dired-build-subdir-alist): When file ends in colon,
don't exit the loop, just disregard that file.
parent
2f680b20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
31 deletions
+31
-31
lisp/dired.el
lisp/dired.el
+31
-31
No files found.
lisp/dired.el
View file @
a3d76960
...
...
@@ -2204,40 +2204,40 @@ instead of `dired-actual-switches'."
(
concat
"\\`"
(
match-string
1
default-directory
)))))
(
goto-char
(
point-min
))
(
setq
dired-subdir-alist
nil
)
(
while
(
and
(
re-search-forward
dired-subdir-regexp
nil
t
)
;; Avoid taking a file name ending in a colon
;; as a subdir name.
(
not
(
save-excursion
(
goto-char
(
match-beginning
0
))
(
beginning-of-line
)
(
forward-char
2
)
(
save-match-data
(
looking-at
dired-re-perms
)))
))
(
save-excursion
(
goto-char
(
match-beginning
1
))
(
setq
new-dir-name
(
buffer-substring-no-properties
(
point
)
(
match-end
1
))
new-dir-name
(
save-match-data
(
if
(
and
R-ftp-base-dir-regex
(
not
(
string=
new-dir-name
default-directory
))
(
string-match
R-ftp-base-dir-regex
new-dir-name
))
(
concat
default-directory
(
substring
new-dir-name
(
match-end
0
)))
(
expand-file-name
new-dir-name
))))
(
delete-region
(
point
)
(
match-end
1
))
(
insert
new-dir-name
))
(
while
(
re-search-forward
dired-subdir-regexp
nil
t
)
;; Avoid taking a file name ending in a colon
;; as a subdir name.
(
unless
(
save-excursion
(
goto-char
(
match-beginning
0
))
(
beginning-of-line
)
(
forward-char
2
)
(
save-match-data
(
looking-at
dired-re-perms
)))
(
save-excursion
(
goto-char
(
match-beginning
1
))
(
setq
new-dir-name
(
buffer-substring-no-properties
(
point
)
(
match-end
1
))
new-dir-name
(
save-match-data
(
if
(
and
R-ftp-base-dir-regex
(
not
(
string=
new-dir-name
default-directory
))
(
string-match
R-ftp-base-dir-regex
new-dir-name
))
(
concat
default-directory
(
substring
new-dir-name
(
match-end
0
)))
(
expand-file-name
new-dir-name
))))
(
delete-region
(
point
)
(
match-end
1
))
(
insert
new-dir-name
))
)
(
setq
count
(
1+
count
))
(
dired-alist-add-1
new-dir-name
;; Place a sub directory boundary between lines.
(
save-excursion
(
goto-char
(
match-beginning
0
))
(
beginning-of-line
)
(
point-marker
))))
;; Place a sub directory boundary between lines.
(
save-excursion
(
goto-char
(
match-beginning
0
))
(
beginning-of-line
)
(
point-marker
))))
(
if
(
and
(
>
count
1
)
(
interactive-p
))
(
message
"Buffer includes %d directories"
count
))
;; We don't need to sort it because it is in buffer order per
;; constructionem. Return new alist:
dired-subdir-alist
))
)
(
message
"Buffer includes %d directories"
count
))
)
;; We don't need to sort it because it is in buffer order per
;; constructionem. Return new alist:
dired-subdir-alist
))
(
defun
dired-alist-add-1
(
dir
new-marker
)
;; Add new DIR at NEW-MARKER. Don't sort.
...
...
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