From 3096684711648eea84af4061bf769f0692af8f60 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 21 May 1998 14:26:10 +0000 Subject: [PATCH] (file-name-invalid-regexp): New variable, moved here from arc-mode.el --- lisp/files.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lisp/files.el b/lisp/files.el index d0ecd6c2922..7d1ffa81235 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -170,6 +170,18 @@ If the buffer is visiting a new file, the value is nil.") (defvar buffer-file-numbers-unique (not (memq system-type '(windows-nt))) "Non-nil means that buffer-file-number uniquely identifies files.") +(defvar file-name-invalid-regexp + (cond ((and (eq system-type 'ms-dos) (not (msdos-long-file-names))) + (concat "\\(^\\([A-z]:\\)?/?.*:\\)\\|" ; colon except after drive + "[+, ;=|<>\"?*]\\|\\[\\|\\]\\|" ; invalid characters + "\\(/\\.\\.?[^/]\\)\\|" ; leading dots + "\\(/[^/.]+\\.[^/.]*\\.\\)")) ; more than a single dot + ((memq system-type '(ms-dos windows-nt)) + (concat "\\(^\\([A-z]:\\)?/?.*:\\)\\|" ; colon except after drive + "[|<>\"?*]")) ; invalid characters + (t "[\000]")) + "Regexp recognizing file names which aren't allowed by the filesystem.") + (defcustom file-precious-flag nil "*Non-nil means protect against I/O errors while saving files. Some modes set this non-nil in particular buffers. -- 2.39.2