comparison lisp/files.el @ 6294:6044f2615082

(find-buffer-visiting): Don't compare NUMBER if it is nil.
author Richard M. Stallman <rms@gnu.org>
date Thu, 10 Mar 1994 17:23:56 +0000
parents d19db87b8c8e
children 9217f29851c2
comparison
equal deleted inserted replaced
6293:649c8a929063 6294:6044f2615082
590 (setq found (car list)))) 590 (setq found (car list))))
591 (setq list (cdr list))) 591 (setq list (cdr list)))
592 found) 592 found)
593 (let ((number (nthcdr 10 (file-attributes truename))) 593 (let ((number (nthcdr 10 (file-attributes truename)))
594 (list (buffer-list)) found) 594 (list (buffer-list)) found)
595 (while (and (not found) list) 595 (and number
596 (save-excursion 596 (while (and (not found) list)
597 (set-buffer (car list)) 597 (save-excursion
598 (if (and (equal buffer-file-number number) 598 (set-buffer (car list))
599 ;; Verify this buffer's file number 599 (if (and (equal buffer-file-number number)
600 ;; still belongs to its file. 600 ;; Verify this buffer's file number
601 (file-exists-p buffer-file-name) 601 ;; still belongs to its file.
602 (equal (nthcdr 10 (file-attributes buffer-file-name)) 602 (file-exists-p buffer-file-name)
603 number)) 603 (equal (nthcdr 10 (file-attributes buffer-file-name))
604 (setq found (car list)))) 604 number))
605 (setq list (cdr list))) 605 (setq found (car list))))
606 (setq list (cdr list))))
606 found)))) 607 found))))
607 608
608 (defun find-file-noselect (filename &optional nowarn) 609 (defun find-file-noselect (filename &optional nowarn)
609 "Read file FILENAME into a buffer and return the buffer. 610 "Read file FILENAME into a buffer and return the buffer.
610 If a buffer exists visiting FILENAME, return that one, but 611 If a buffer exists visiting FILENAME, return that one, but