comparison lisp/dired-aux.el @ 6633:451a2973d86b

(dired-add-entry, dired-insert-subdir-doinsert): Call dired-insert-set-properties. (dired-add-entry): Don't make name absolute; bind default-directory.
author Richard M. Stallman <rms@gnu.org>
date Fri, 01 Apr 1994 18:51:17 +0000
parents 9217f29851c2
children ec94aee0bf55
comparison
equal deleted inserted replaced
6632:652dc23b83fd 6633:451a2973d86b
767 ;; This better not moves into the next subdir! 767 ;; This better not moves into the next subdir!
768 (dired-goto-next-nontrivial-file)) 768 (dired-goto-next-nontrivial-file))
769 ;; not found 769 ;; not found
770 (throw 'not-found "Subdir not found"))) 770 (throw 'not-found "Subdir not found")))
771 ;; found and point is at The Right Place: 771 ;; found and point is at The Right Place:
772 (let (buffer-read-only) 772 (let (buffer-read-only (opoint (point)))
773 (beginning-of-line) 773 (beginning-of-line)
774 (dired-add-entry-do-indentation marker-char) 774 (dired-add-entry-do-indentation marker-char)
775 ;; don't expand `.' ! 775 ;; don't expand `.' !
776 (insert-directory (dired-make-absolute filename directory) 776 (let ((default-directory directory))
777 (concat dired-actual-switches "d")) 777 (insert-directory filename
778 (concat dired-actual-switches "d")))
779 (dired-insert-set-properties opoint (point))
778 (forward-line -1) 780 (forward-line -1)
779 ;; We want to have the non-directory part, only: 781 ;; We want to have the non-directory part, only:
780 (let* ((beg (dired-move-to-filename t)) ; error for strange output 782 (let* ((beg (dired-move-to-filename t)) ; error for strange output
781 (end (dired-move-to-end-of-filename))) 783 (end (dired-move-to-end-of-filename)))
782 (setq filename (buffer-substring beg end)) 784 (setq filename (buffer-substring beg end))
1590 (or switches 1592 (or switches
1591 (dired-replace-in-string "R" "" dired-actual-switches)))) 1593 (dired-replace-in-string "R" "" dired-actual-switches))))
1592 (if (equal dirname (car (car (reverse dired-subdir-alist)))) 1594 (if (equal dirname (car (car (reverse dired-subdir-alist))))
1593 ;; top level directory may contain wildcards: 1595 ;; top level directory may contain wildcards:
1594 (dired-readin-insert dired-directory) 1596 (dired-readin-insert dired-directory)
1595 (insert-directory dirname dired-actual-switches nil t))) 1597 (let ((opoint (point)))
1598 (insert-directory dirname dired-actual-switches nil t)
1599 (dired-insert-set-properties opoint (point)))))
1596 (message "Reading directory %s...done" dirname) 1600 (message "Reading directory %s...done" dirname)
1597 (setq end (point-marker)) 1601 (setq end (point-marker))
1598 (indent-rigidly begin end 2) 1602 (indent-rigidly begin end 2)
1599 ;; call dired-insert-headerline afterwards, as under VMS dired-ls 1603 ;; call dired-insert-headerline afterwards, as under VMS dired-ls
1600 ;; does insert the headerline itself and the insert function just 1604 ;; does insert the headerline itself and the insert function just