From: Eli Zaretskii Date: Wed, 15 Jul 1998 10:21:04 +0000 (+0000) Subject: (file-name-invalid-regexp): Fix the part which handles colons in file names. X-Git-Tag: emacs-20.3~317 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9959c16e4f83ba4798ffa089261d8f4b0a30361a;p=emacs.git (file-name-invalid-regexp): Fix the part which handles colons in file names. --- diff --git a/lisp/files.el b/lisp/files.el index 1bd0ac57219..cb7336f5d28 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -172,13 +172,13 @@ If the buffer is visiting a new file, the value is nil.") (defvar file-name-invalid-regexp (cond ((and (eq system-type 'ms-dos) (not (msdos-long-file-names))) - (concat "\\(^\\([A-z]:\\)?/?.*:\\)\\|" ; colon except after drive + (concat "^\\([^A-Z[-`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 + (concat "^\\([^A-Z[-`a-z]\\|..+\\)?:\\|" ; colon except after drive "[|<>\"?*\000-\031]")) ; invalid characters (t "[\000]")) "Regexp recognizing file names which aren't allowed by the filesystem.")