changeset 31724:187803ce240e

(find-file-suppress-same-file-warnings): New user-option. (find-file-noselect): Use it.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 19 Sep 2000 15:14:24 +0000
parents 8162eb7a8a98
children a8e9876c67bd
files lisp/files.el
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Tue Sep 19 15:00:29 2000 +0000
+++ b/lisp/files.el	Tue Sep 19 15:14:24 2000 +0000
@@ -966,6 +966,15 @@
   :version "20.4"
   :type 'boolean)
 
+(defcustom find-file-suppress-same-file-warnings nil
+  "*Non-nil means suppress warning messages for symlinked files.
+When nil, Emacs prints a warning when visiting a file that is already
+visited, but with a different name.  Setting this option to t
+suppresses this warning "
+  :group 'files
+  :version "21.1"
+  :type 'boolean)
+
 (defun find-file-noselect (filename &optional nowarn rawfile wildcards)
   "Read file FILENAME into a buffer and return the buffer.
 If a buffer exists visiting FILENAME, return that one, but
@@ -1008,6 +1017,7 @@
 	(if other
 	    (progn
 	      (or nowarn
+		  find-file-suppress-same-file-warnings
 		  (string-equal filename (buffer-file-name other))
 		  (message "%s and %s are the same file"
 			   filename (buffer-file-name other)))