diff options
| author | Richard M. Stallman | 1994-06-15 22:39:01 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-06-15 22:39:01 +0000 |
| commit | acf310c90d3d625c1f1e6855f4171f6609be04ea (patch) | |
| tree | 06e0b431daa57fa606243d28301eaaf4ec241d1e | |
| parent | da5667c68aa0fbc9997ff933021a2abc772bf706 (diff) | |
| download | emacs-acf310c90d3d625c1f1e6855f4171f6609be04ea.tar.gz emacs-acf310c90d3d625c1f1e6855f4171f6609be04ea.zip | |
(dired-build-subdir-alist): Avoid mistaking a file name
ending in a colon for a subdir header line.
| -rw-r--r-- | lisp/dired.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/dired.el b/lisp/dired.el index 8d7c76ab08c..286e7d10dbd 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -185,6 +185,7 @@ directory name and the cdr is the actual files to list.") | |||
| 185 | "-[-r][-w].[-r][-w][xs][-r][-w]." | 185 | "-[-r][-w].[-r][-w][xs][-r][-w]." |
| 186 | "-[-r][-w].[-r][-w].[-r][-w][xst]") | 186 | "-[-r][-w].[-r][-w].[-r][-w][xst]") |
| 187 | "\\|")) | 187 | "\\|")) |
| 188 | (defvar dired-re-perms "-[-r][-w].[-r][-w].[-r][-w].") | ||
| 188 | (defvar dired-re-dot "^.* \\.\\.?$") | 189 | (defvar dired-re-dot "^.* \\.\\.?$") |
| 189 | 190 | ||
| 190 | (defvar dired-subdir-alist nil | 191 | (defvar dired-subdir-alist nil |
| @@ -1360,7 +1361,14 @@ Returns the new value of the alist." | |||
| 1360 | new-dir-name) | 1361 | new-dir-name) |
| 1361 | (goto-char (point-min)) | 1362 | (goto-char (point-min)) |
| 1362 | (setq dired-subdir-alist nil) | 1363 | (setq dired-subdir-alist nil) |
| 1363 | (while (re-search-forward dired-subdir-regexp nil t) | 1364 | (while (and (re-search-forward dired-subdir-regexp nil t) |
| 1365 | ;; Avoid taking a file name ending in a colon | ||
| 1366 | ;; as a subdir name. | ||
| 1367 | (not (save-excursion | ||
| 1368 | (goto-char (match-beginning 0)) | ||
| 1369 | (beginning-of-line) | ||
| 1370 | (forward-char 2) | ||
| 1371 | (looking-at dired-re-perms)))) | ||
| 1364 | (save-excursion | 1372 | (save-excursion |
| 1365 | (goto-char (match-beginning 1)) | 1373 | (goto-char (match-beginning 1)) |
| 1366 | (setq new-dir-name | 1374 | (setq new-dir-name |