]> git.eshelyaron.com Git - emacs.git/commitdiff
(dired-find-buffer-nocreate): Check only buffers in
authorKarl Heuer <kwzh@gnu.org>
Mon, 29 May 1995 04:36:26 +0000 (04:36 +0000)
committerKarl Heuer <kwzh@gnu.org>
Mon, 29 May 1995 04:36:26 +0000 (04:36 +0000)
dired-buffers instead of all buffers in (buffer-list).

lisp/dired.el

index 99c1b7961a2b9e9ab2e5520a527f5a4331850dde..9b49ceb0ddda387dd3d3982c7c7a419e402c40c0 100644 (file)
@@ -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))