mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
(dired-mode): Don't change the value of case-fold-search.
(dired-build-subdir-alist): Call `expand-file-name' to clean up the subdirectory title (removing extra "./").
This commit is contained in:
parent
4b00edc888
commit
3222085ea2
1 changed files with 16 additions and 9 deletions
|
|
@ -928,7 +928,7 @@ Keybindings:
|
|||
(dired-advertise) ; default-directory is already set
|
||||
(setq major-mode 'dired-mode
|
||||
mode-name "Dired"
|
||||
case-fold-search nil
|
||||
;; case-fold-search nil
|
||||
buffer-read-only t
|
||||
selective-display t ; for subdirectory hiding
|
||||
mode-line-buffer-identification '("Dired: %17b"))
|
||||
|
|
@ -1325,18 +1325,25 @@ Returns the new value of the alist."
|
|||
(interactive)
|
||||
(dired-clear-alist)
|
||||
(save-excursion
|
||||
(let ((count 0))
|
||||
(let ((count 0)
|
||||
(buffer-read-only nil)
|
||||
new-dir-name)
|
||||
(goto-char (point-min))
|
||||
(setq dired-subdir-alist nil)
|
||||
(while (re-search-forward dired-subdir-regexp nil t)
|
||||
(save-excursion
|
||||
(goto-char (match-beginning 1))
|
||||
(setq new-dir-name
|
||||
(expand-file-name (buffer-substring (point) (match-end 1))))
|
||||
(delete-region (point) (match-end 1))
|
||||
(insert new-dir-name))
|
||||
(setq count (1+ count))
|
||||
(dired-alist-add-1 (buffer-substring (match-beginning 1)
|
||||
(match-end 1))
|
||||
;; Put subdir boundary between lines:
|
||||
(save-excursion
|
||||
(goto-char (match-beginning 0))
|
||||
(beginning-of-line)
|
||||
(point-marker))))
|
||||
(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))))
|
||||
(if (> count 1)
|
||||
(message "Buffer includes %d directories" count))
|
||||
;; We don't need to sort it because it is in buffer order per
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue