comparison lisp/dired.el @ 1130:e18597ff3c95

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Sun, 13 Sep 1992 20:40:20 +0000
parents c9feb3e64805
children 54a44b2b9591
comparison
equal deleted inserted replaced
1129:6f1d3e86c4fd 1130:e18597ff3c95
493 buffer-read-only) 493 buffer-read-only)
494 (goto-char (point-min)) 494 (goto-char (point-min))
495 (setq mark-alist;; only after dired-remember-hidden since this unhides: 495 (setq mark-alist;; only after dired-remember-hidden since this unhides:
496 (dired-remember-marks (point-min) (point-max))) 496 (dired-remember-marks (point-min) (point-max)))
497 ;; treat top level dir extra (it may contain wildcards) 497 ;; treat top level dir extra (it may contain wildcards)
498 (dired-uncache dired-directory)
498 (dired-readin dired-directory (current-buffer)) 499 (dired-readin dired-directory (current-buffer))
499 (let ((dired-after-readin-hook nil)) 500 (let ((dired-after-readin-hook nil))
500 ;; don't run that hook for each subdir... 501 ;; don't run that hook for each subdir...
501 (dired-insert-old-subdirs old-subdir-alist)) 502 (dired-insert-old-subdirs old-subdir-alist))
502 (dired-mark-remembered mark-alist) ; mark files that were marked 503 (dired-mark-remembered mark-alist) ; mark files that were marked
569 (while old-subdir-alist 570 (while old-subdir-alist
570 (setq elt (car old-subdir-alist) 571 (setq elt (car old-subdir-alist)
571 old-subdir-alist (cdr old-subdir-alist) 572 old-subdir-alist (cdr old-subdir-alist)
572 dir (car elt)) 573 dir (car elt))
573 (condition-case () 574 (condition-case ()
574 (dired-insert-subdir dir) 575 (progn
576 (dired-uncache dir)
577 (dired-insert-subdir dir))
575 (error nil)))))) 578 (error nil))))))
579
580 ;; Remove directory DIR from any directory cache.
581 (defun dired-uncache (dir)
582 (let (handler (handlers file-name-handler-alist))
583 (save-match-data
584 (while (and (consp handlers) (null handler))
585 (if (and (consp (car handlers))
586 (stringp (car (car handlers)))
587 (string-match (car (car handlers)) dir))
588 (setq handler (cdr (car handlers))))
589 (setq handlers (cdr handlers))))
590 (if handler
591 (funcall handler 'dired-uncache dir))))
576 592
577 ;; dired mode key bindings and initialization 593 ;; dired mode key bindings and initialization
578 594
579 (defvar dired-mode-map nil "Local keymap for dired-mode buffers.") 595 (defvar dired-mode-map nil "Local keymap for dired-mode buffers.")
580 (if dired-mode-map 596 (if dired-mode-map
852 otherwise, display it in another buffer." 868 otherwise, display it in another buffer."
853 (interactive) 869 (interactive)
854 (if (file-directory-p (dired-get-filename)) 870 (if (file-directory-p (dired-get-filename))
855 (or (and dired-subdir-alist (dired-goto-subdir (dired-get-filename))) 871 (or (and dired-subdir-alist (dired-goto-subdir (dired-get-filename)))
856 (dired (dired-get-filename))) 872 (dired (dired-get-filename)))
857 (view-file (file-name-sans-versions (dired-get-filename) t)))) 873 (view-file (dired-get-filename))))
858 874
859 (defun dired-find-file-other-window () 875 (defun dired-find-file-other-window ()
860 "In dired, visit this file or directory in another window." 876 "In dired, visit this file or directory in another window."
861 (interactive) 877 (interactive)
862 (find-file-other-window (file-name-sans-versions (dired-get-filename) t))) 878 (find-file-other-window (file-name-sans-versions (dired-get-filename) t)))