From: Gerd Moellmann Date: Tue, 19 Sep 2000 15:14:42 +0000 (+0000) Subject: (find-file-suppress-same-file-warnings): New X-Git-Tag: emacs-pretest-21.0.90~1521 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8fb3df5935fb873441994c63e00b4d17f335603a;p=emacs.git (find-file-suppress-same-file-warnings): New user-option. (find-file-noselect): Use it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 15486ebc471..47b4f2a82ed 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2000-09-19 Gerd Moellmann + * files.el (find-file-suppress-same-file-warnings): New + user-option. + (find-file-noselect): Use it. + * startup.el (fancy-splash-delay, fancy-splash-image): Add :version. (fancy-splash-screen): Defgroup. diff --git a/lisp/files.el b/lisp/files.el index 17c54f69d51..58b9a17d4ec 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -966,6 +966,15 @@ whose names match the pattern." :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 @@ that are visiting the various files." (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)))