From f5b06a953d4ab4155e506d9a079fe1c97790446f Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Mon, 29 May 1995 04:36:26 +0000 Subject: [PATCH] (dired-find-buffer-nocreate): Check only buffers in dired-buffers instead of all buffers in (buffer-list). --- lisp/dired.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)) -- 2.39.2