;;; dired.el --- directory-browsing commands
;; Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995, 1996, 1997, 2000,
-;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
;; Free Software Foundation, Inc.
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
(setq mark-alist;; only after dired-remember-hidden since this unhides:
(dired-remember-marks (point-min) (point-max)))
;; treat top level dir extra (it may contain wildcards)
- (dired-uncache
- (if (consp dired-directory) (car dired-directory) dired-directory))
+ (if (not (consp dired-directory))
+ (dired-uncache dired-directory)
+ (dired-uncache (car dired-directory))
+ (dolist (dir (cdr dired-directory))
+ (if (file-name-absolute-p dir)
+ (dired-uncache dir))))
;; Run dired-after-readin-hook just once, below.
(let ((dired-after-readin-hook nil))
(dired-readin)
The positions have the form (BUFFER-POSITION WINDOW-POSITIONS).
BUFFER-POSITION is the point position in the current dired buffer.
-The buffer position have the form (BUFFER DIRED-FILENAME BUFFER-POINT).
+It has the form (BUFFER DIRED-FILENAME BUFFER-POINT).
WINDOW-POSITIONS are current positions in all windows displaying
this dired buffer. The window positions have the form (WINDOW
;; Keeping Dired buffers in sync with the filesystem and with each other
(defun dired-buffers-for-dir (dir &optional file)
-;; Return a list of buffers that dired DIR (top level or in-situ subdir).
+;; Return a list of buffers for DIR (top level or in-situ subdir).
;; If FILE is non-nil, include only those whose wildcard pattern (if any)
;; matches FILE.
;; The list is in reverse order of buffer creation, most recent last.
;; As a side effect, killed dired buffers for DIR are removed from
;; dired-buffers.
(setq dir (file-name-as-directory dir))
- (let ((alist dired-buffers) result elt buf)
- (while alist
- (setq elt (car alist)
- buf (cdr elt))
- (if (buffer-name buf)
- (if (dired-in-this-tree dir (car elt))
- (with-current-buffer buf
- (and (assoc dir dired-subdir-alist)
- (or (null file)
- (let ((wildcards
- (file-name-nondirectory dired-directory)))
- (or (= 0 (length wildcards))
- (string-match (dired-glob-regexp wildcards)
- file))))
- (setq result (cons buf result)))))
- ;; else buffer is killed - clean up:
+ (let (result buf)
+ (dolist (elt dired-buffers)
+ (setq buf (cdr elt))
+ (cond
+ ((null (buffer-name buf))
+ ;; Buffer is killed - clean up:
(setq dired-buffers (delq elt dired-buffers)))
- (setq alist (cdr alist)))
+ ((dired-in-this-tree dir (car elt))
+ (with-current-buffer buf
+ (and (assoc dir dired-subdir-alist)
+ (or (null file)
+ (if (stringp dired-directory)
+ (let ((wildcards (file-name-nondirectory
+ dired-directory)))
+ (or (= 0 (length wildcards))
+ (string-match (dired-glob-regexp wildcards)
+ file)))
+ (member (expand-file-name file dir)
+ (cdr dired-directory))))
+ (setq result (cons buf result)))))))
result))
(defun dired-glob-regexp (pattern)
;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
-;;;;;; dired-diff) "dired-aux" "dired-aux.el" "c7d3d0354ca849c90d3aaf33fa06341d")
+;;;;;; dired-diff) "dired-aux" "dired-aux.el" "07676ea25af17f5d50cc5db4f53bddc0")
;;; Generated autoloads from dired-aux.el
(autoload 'dired-diff "dired-aux" "\
If there is already something hidden, make everything visible again.
Use \\[dired-hide-subdir] to (un)hide a particular subdirectory.
-\(fn ARG)" t nil)
+\(fn &optional IGNORED)" t nil)
(autoload 'dired-isearch-filenames-setup "dired-aux" "\
Set up isearch to search in Dired file names.
;;;***
\f
;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el"
-;;;;;; "c1bb83404017aa89655222b2b50471ed")
+;;;;;; "bb37ec379c0a523368794491b691fd8d")
;;; Generated autoloads from dired-x.el
(autoload 'dired-jump "dired-x" "\