From: Richard M. Stallman Date: Tue, 4 Jun 1996 16:17:22 +0000 (+0000) Subject: (buffer-file-numbers-unique): New variable; X-Git-Tag: emacs-19.34~533 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=de88363f854f16ab2746ddf44c9150cfdf7a3d90;p=emacs.git (buffer-file-numbers-unique): New variable; initialize to nil for windows-nt. (find-buffer-visiting): Skip search for buffer based on buffer-file-number if these are not unique. --- diff --git a/lisp/files.el b/lisp/files.el index eb2b3ed9c9d..7a3bb717c2a 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -123,6 +123,9 @@ If the buffer is visiting a new file, the value is nil.") (make-variable-buffer-local 'buffer-file-number) (put 'buffer-file-number 'permanent-local t) +(defvar buffer-file-numbers-unique (not (memq system-type '(windows-nt))) + "Non-nil means that buffer-file-number uniquely identifies files.") + (defconst file-precious-flag nil "*Non-nil means protect against I/O errors while saving files. Some modes set this non-nil in particular buffers. @@ -691,7 +694,8 @@ If there is no such live buffer, return nil." found) (let ((number (nthcdr 10 (file-attributes truename))) (list (buffer-list)) found) - (and number + (and buffer-file-numbers-unique + number (while (and (not found) list) (save-excursion (set-buffer (car list))