aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii1998-06-14 15:34:02 +0000
committerEli Zaretskii1998-06-14 15:34:02 +0000
commit106a57a4cc6d51bb25f3163831a31dedc45f96e5 (patch)
tree9bdaa307737fdd61f49d69eb41342e773ed577a3 /lisp
parent60e6659c304191b62f44a5cab1f37ff10dca5a6e (diff)
downloademacs-106a57a4cc6d51bb25f3163831a31dedc45f96e5.tar.gz
emacs-106a57a4cc6d51bb25f3163831a31dedc45f96e5.zip
(file-name-invalid-regexp): Add control characters for DOS/Windows
as they are disallowed by the filesystem there.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/files.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 26f39169f8a..6e7e889b880 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -174,11 +174,12 @@ If the buffer is visiting a new file, the value is nil.")
174 (cond ((and (eq system-type 'ms-dos) (not (msdos-long-file-names))) 174 (cond ((and (eq system-type 'ms-dos) (not (msdos-long-file-names)))
175 (concat "\\(^\\([A-z]:\\)?/?.*:\\)\\|" ; colon except after drive 175 (concat "\\(^\\([A-z]:\\)?/?.*:\\)\\|" ; colon except after drive
176 "[+, ;=|<>\"?*]\\|\\[\\|\\]\\|" ; invalid characters 176 "[+, ;=|<>\"?*]\\|\\[\\|\\]\\|" ; invalid characters
177 "[\000-\031]|" ; control characters
177 "\\(/\\.\\.?[^/]\\)\\|" ; leading dots 178 "\\(/\\.\\.?[^/]\\)\\|" ; leading dots
178 "\\(/[^/.]+\\.[^/.]*\\.\\)")) ; more than a single dot 179 "\\(/[^/.]+\\.[^/.]*\\.\\)")) ; more than a single dot
179 ((memq system-type '(ms-dos windows-nt)) 180 ((memq system-type '(ms-dos windows-nt))
180 (concat "\\(^\\([A-z]:\\)?/?.*:\\)\\|" ; colon except after drive 181 (concat "\\(^\\([A-z]:\\)?/?.*:\\)\\|" ; colon except after drive
181 "[|<>\"?*]")) ; invalid characters 182 "[|<>\"?*\000-\031]")) ; invalid characters
182 (t "[\000]")) 183 (t "[\000]"))
183 "Regexp recognizing file names which aren't allowed by the filesystem.") 184 "Regexp recognizing file names which aren't allowed by the filesystem.")
184 185