From: Eli Zaretskii Date: Sun, 14 Jun 1998 15:34:02 +0000 (+0000) Subject: (file-name-invalid-regexp): Add control characters for DOS/Windows X-Git-Tag: emacs-20.3~599 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=106a57a4cc6d51bb25f3163831a31dedc45f96e5;p=emacs.git (file-name-invalid-regexp): Add control characters for DOS/Windows as they are disallowed by the filesystem there. --- 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.") (cond ((and (eq system-type 'ms-dos) (not (msdos-long-file-names))) (concat "\\(^\\([A-z]:\\)?/?.*:\\)\\|" ; colon except after drive "[+, ;=|<>\"?*]\\|\\[\\|\\]\\|" ; invalid characters + "[\000-\031]|" ; control characters "\\(/\\.\\.?[^/]\\)\\|" ; leading dots "\\(/[^/.]+\\.[^/.]*\\.\\)")) ; more than a single dot ((memq system-type '(ms-dos windows-nt)) (concat "\\(^\\([A-z]:\\)?/?.*:\\)\\|" ; colon except after drive - "[|<>\"?*]")) ; invalid characters + "[|<>\"?*\000-\031]")) ; invalid characters (t "[\000]")) "Regexp recognizing file names which aren't allowed by the filesystem.")