Mercurial > emacs
changeset 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 | 091ae363ac1c |
children | d23f2c9990b2 |
files | lisp/dired.el |
diffstat | 1 files changed, 9 insertions(+), 7 deletions(-) [+] |
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))