]> git.eshelyaron.com Git - emacs.git/commitdiff
(find-file-noselect): Suppress same-file warning if
authorRichard M. Stallman <rms@gnu.org>
Mon, 9 May 1994 22:54:09 +0000 (22:54 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 9 May 1994 22:54:09 +0000 (22:54 +0000)
both filenames would print identically.

lisp/files.el

index 4f7fead12aef90d917011c40548b12e507e99e00..0a8aca1bd63bf1e1d972daed0dccd4e7de811ecb 100644 (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))))