# HG changeset patch # User Karl Heuer # Date 801462201 0 # Node ID 9b53ce243465cf46c3b48c4ab43afdf3c0b905e0 # Parent f3fb1e5dfde11884e146fd91d4d92febff444386 (dired-find-buffer-nocreate): Don't try to find a wildcard as a subdirectory. diff -r f3fb1e5dfde1 -r 9b53ce243465 lisp/dired-x.el --- a/lisp/dired-x.el Fri May 26 04:18:39 1995 +0000 +++ b/lisp/dired-x.el Fri May 26 04:23:21 1995 +0000 @@ -1366,18 +1366,20 @@ ;;; REDEFINE. ;;; Redefines dired.el's version of `dired-find-buffer-nocreate' (defun dired-find-buffer-nocreate (dirname) - (if dired-find-subdir + (if (and dired-find-subdir + ;; don't try to find a wildcard as a subdirectory + (string-equal dirname (file-name-directory dirname))) (let* ((cur-buf (current-buffer)) - (buffers (nreverse + (buffers (nreverse (dired-buffers-for-dir (expand-file-name dirname)))) - (cur-buf-matches (and (memq cur-buf buffers) - ;; wildcards must match, too: - (equal dired-directory dirname)))) - ;; We don't want to switch to the same buffer--- - (setq buffers (delq cur-buf buffers));;need setq with delq - (or (car (sort buffers (function dired-buffer-more-recently-used-p))) - ;; ---unless it's the only possibility: - (and cur-buf-matches cur-buf))) + (cur-buf-matches (and (memq cur-buf buffers) + ;; wildcards must match, too: + (equal dired-directory dirname)))) + ;; We don't want to switch to the same buffer--- + (setq buffers (delq cur-buf buffers));;need setq with delq + (or (car (sort buffers (function dired-buffer-more-recently-used-p))) + ;; ---unless it's the only possibility: + (and cur-buf-matches cur-buf))) (dired-old-find-buffer-nocreate dirname))) ;; This should be a builtin