From: Karl Heuer Date: Mon, 29 May 1995 04:36:26 +0000 (+0000) Subject: (dired-find-buffer-nocreate): Check only buffers in X-Git-Tag: emacs-19.34~3888 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f5b06a953d4ab4155e506d9a079fe1c97790446f;p=emacs.git (dired-find-buffer-nocreate): Check only buffers in dired-buffers instead of all buffers in (buffer-list). --- diff --git a/lisp/dired.el b/lisp/dired.el index 99c1b7961a2..9b49ceb0ddd 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -457,13 +457,13 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh." ;; This differs from dired-buffers-for-dir in that it does not consider ;; subdirs of default-directory and searches for the first match only (defun dired-find-buffer-nocreate (dirname) - (let (found (blist (buffer-list))) + (let (found (blist dired-buffers)) ; was (buffer-list) (while blist (save-excursion - (set-buffer (car blist)) + (set-buffer (cdr (car blist))) (if (and (eq major-mode 'dired-mode) (equal dired-directory dirname)) - (setq found (car blist) + (setq found (cdr (car blist)) blist nil) (setq blist (cdr blist))))) found))