(file-name-invalid-regexp): Fix the part which handles colons in file names.
This commit is contained in:
parent
6356e646f5
commit
9959c16e4f
1 changed files with 2 additions and 2 deletions
|
@ -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.")
|
||||
|
|
Loading…
Add table
Reference in a new issue