aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-09-19 15:14:42 +0000
committerGerd Moellmann2000-09-19 15:14:42 +0000
commit8fb3df5935fb873441994c63e00b4d17f335603a (patch)
tree48bd43290f1c0904282923fe0a1e5c147109d3a4
parenta01bb1db13758f6fb457a506fbd0ab4a02d6615a (diff)
downloademacs-8fb3df5935fb873441994c63e00b4d17f335603a.tar.gz
emacs-8fb3df5935fb873441994c63e00b4d17f335603a.zip
(find-file-suppress-same-file-warnings): New
user-option. (find-file-noselect): Use it.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/files.el10
2 files changed, 14 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 15486ebc471..47b4f2a82ed 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12000-09-19 Gerd Moellmann <gerd@gnu.org> 12000-09-19 Gerd Moellmann <gerd@gnu.org>
2 2
3 * files.el (find-file-suppress-same-file-warnings): New
4 user-option.
5 (find-file-noselect): Use it.
6
3 * startup.el (fancy-splash-delay, fancy-splash-image): Add 7 * startup.el (fancy-splash-delay, fancy-splash-image): Add
4 :version. 8 :version.
5 (fancy-splash-screen): Defgroup. 9 (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."
966 :version "20.4" 966 :version "20.4"
967 :type 'boolean) 967 :type 'boolean)
968 968
969(defcustom find-file-suppress-same-file-warnings nil
970 "*Non-nil means suppress warning messages for symlinked files.
971When nil, Emacs prints a warning when visiting a file that is already
972visited, but with a different name. Setting this option to t
973suppresses this warning "
974 :group 'files
975 :version "21.1"
976 :type 'boolean)
977
969(defun find-file-noselect (filename &optional nowarn rawfile wildcards) 978(defun find-file-noselect (filename &optional nowarn rawfile wildcards)
970 "Read file FILENAME into a buffer and return the buffer. 979 "Read file FILENAME into a buffer and return the buffer.
971If a buffer exists visiting FILENAME, return that one, but 980If a buffer exists visiting FILENAME, return that one, but
@@ -1008,6 +1017,7 @@ that are visiting the various files."
1008 (if other 1017 (if other
1009 (progn 1018 (progn
1010 (or nowarn 1019 (or nowarn
1020 find-file-suppress-same-file-warnings
1011 (string-equal filename (buffer-file-name other)) 1021 (string-equal filename (buffer-file-name other))
1012 (message "%s and %s are the same file" 1022 (message "%s and %s are the same file"
1013 filename (buffer-file-name other))) 1023 filename (buffer-file-name other)))