(find-file-noselect): Suppress same-file warning if

both filenames would print identically.
This commit is contained in:
Richard M. Stallman 1994-05-09 22:54:09 +00:00
parent 4f5d303b20
commit 327bebe804

View file

@ -631,8 +631,10 @@ The buffer is not selected, just returned to the caller."
;; Let user know if there is a buffer with the same truename.
(if other
(progn
(or nowarn (message "%s and %s are the same file"
filename (buffer-file-name other)))
(or nowarn
(string-equal filename (buffer-file-name other))
(message "%s and %s are the same file"
filename (buffer-file-name other)))
;; Optionally also find that buffer.
(if (or find-file-existing-other-name find-file-visit-truename)
(setq buf other))))