Mercurial > emacs
comparison lisp/files.el @ 22762:1de4d5771a8f
(file-name-invalid-regexp): Fix the part which handles colons in file names.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Wed, 15 Jul 1998 10:21:04 +0000 |
parents | d35510185a2d |
children | 0e0f06a92324 |
comparison
equal
deleted
inserted
replaced
22761:ad14990a5efc | 22762:1de4d5771a8f |
---|---|
170 (defvar buffer-file-numbers-unique (not (memq system-type '(windows-nt))) | 170 (defvar buffer-file-numbers-unique (not (memq system-type '(windows-nt))) |
171 "Non-nil means that buffer-file-number uniquely identifies files.") | 171 "Non-nil means that buffer-file-number uniquely identifies files.") |
172 | 172 |
173 (defvar file-name-invalid-regexp | 173 (defvar file-name-invalid-regexp |
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[-`a-z]\\|..+\\)?:\\|" ; colon except after drive |
176 "[+, ;=|<>\"?*]\\|\\[\\|\\]\\|" ; invalid characters | 176 "[+, ;=|<>\"?*]\\|\\[\\|\\]\\|" ; invalid characters |
177 "[\000-\031]|" ; control characters | 177 "[\000-\031]|" ; control characters |
178 "\\(/\\.\\.?[^/]\\)\\|" ; leading dots | 178 "\\(/\\.\\.?[^/]\\)\\|" ; leading dots |
179 "\\(/[^/.]+\\.[^/.]*\\.\\)")) ; more than a single dot | 179 "\\(/[^/.]+\\.[^/.]*\\.\\)")) ; more than a single dot |
180 ((memq system-type '(ms-dos windows-nt)) | 180 ((memq system-type '(ms-dos windows-nt)) |
181 (concat "\\(^\\([A-z]:\\)?/?.*:\\)\\|" ; colon except after drive | 181 (concat "^\\([^A-Z[-`a-z]\\|..+\\)?:\\|" ; colon except after drive |
182 "[|<>\"?*\000-\031]")) ; invalid characters | 182 "[|<>\"?*\000-\031]")) ; invalid characters |
183 (t "[\000]")) | 183 (t "[\000]")) |
184 "Regexp recognizing file names which aren't allowed by the filesystem.") | 184 "Regexp recognizing file names which aren't allowed by the filesystem.") |
185 | 185 |
186 (defcustom file-precious-flag nil | 186 (defcustom file-precious-flag nil |