From 327bebe8044741384241bbe5c7c99904c3d748d8 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 9 May 1994 22:54:09 +0000 Subject: [PATCH] (find-file-noselect): Suppress same-file warning if both filenames would print identically. --- lisp/files.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)))) -- 2.39.5