Mercurial > emacs
diff lisp/dired.el @ 12045:ad681fd69905
(dired-find-buffer-nocreate): Ignore dead buffers.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 31 May 1995 21:06:48 +0000 |
parents | 67c7f67b5e0c |
children | 472729271c30 |
line wrap: on
line diff
--- a/lisp/dired.el Wed May 31 20:00:40 1995 +0000 +++ b/lisp/dired.el Wed May 31 21:06:48 1995 +0000 @@ -459,13 +459,15 @@ (defun dired-find-buffer-nocreate (dirname) (let (found (blist dired-buffers)) ; was (buffer-list) (while blist - (save-excursion - (set-buffer (cdr (car blist))) - (if (and (eq major-mode 'dired-mode) - (equal dired-directory dirname)) - (setq found (cdr (car blist)) - blist nil) - (setq blist (cdr blist))))) + (if (null (buffer-name (cdr (car blist)))) + (setq blist (cdr blist)) + (save-excursion + (set-buffer (cdr (car blist))) + (if (and (eq major-mode 'dired-mode) + (equal dired-directory dirname)) + (setq found (cdr (car blist)) + blist nil) + (setq blist (cdr blist)))))) found))