From: Richard M. Stallman Date: Mon, 9 May 1994 22:54:09 +0000 (+0000) Subject: (find-file-noselect): Suppress same-file warning if X-Git-Tag: emacs-19.34~8431 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=327bebe8044741384241bbe5c7c99904c3d748d8;p=emacs.git (find-file-noselect): Suppress same-file warning if both filenames would print identically. --- diff --git a/lisp/files.el b/lisp/files.el index 4f7fead12ae..0a8aca1bd63 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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))))