diff options
| -rw-r--r-- | lisp/arc-mode.el | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index fc5497d6faf..64651fc0972 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el | |||
| @@ -127,18 +127,6 @@ | |||
| 127 | :type 'directory | 127 | :type 'directory |
| 128 | :group 'archive) | 128 | :group 'archive) |
| 129 | 129 | ||
| 130 | (defvar archive-file-name-invalid-regexp | ||
| 131 | (cond ((and (eq system-type 'ms-dos) (not (msdos-long-file-names))) | ||
| 132 | (concat "\\(^\\([A-z]:\\)?/?.*:\\)\\|" ; colon except after drive | ||
| 133 | "[+, ;=|<>\"?*]\\|\\[\\|\\]\\|" ; invalid characters | ||
| 134 | "\\(/\\.\\.?[^/]\\)\\|" ; leading dots | ||
| 135 | "\\(/[^/.]+\\.[^/.]*\\.\\)")) ; more than a single dot | ||
| 136 | ((memq system-type '(ms-dos windows-nt)) | ||
| 137 | (concat "\\(^\\([A-z]:\\)?/?.*:\\)\\|" ; colon except after drive | ||
| 138 | "[|<>\"?*]")) ; invalid characters | ||
| 139 | (t "[\000]")) | ||
| 140 | "Regexp recognizing file names which aren't allowed by the filesystem.") | ||
| 141 | |||
| 142 | (defcustom archive-remote-regexp "^/[^/:]*[^/:.]:" | 130 | (defcustom archive-remote-regexp "^/[^/:]*[^/:.]:" |
| 143 | "*Regexp recognizing archive files names that are not local. | 131 | "*Regexp recognizing archive files names that are not local. |
| 144 | A non-local file is one whose file name is not proper outside Emacs. | 132 | A non-local file is one whose file name is not proper outside Emacs. |
| @@ -544,7 +532,7 @@ archive. | |||
| 544 | (setq archive-read-only | 532 | (setq archive-read-only |
| 545 | (or (not (file-writable-p (buffer-file-name))) | 533 | (or (not (file-writable-p (buffer-file-name))) |
| 546 | (and archive-subfile-mode | 534 | (and archive-subfile-mode |
| 547 | (string-match archive-file-name-invalid-regexp | 535 | (string-match file-name-invalid-regexp |
| 548 | (aref archive-subfile-mode 0))))) | 536 | (aref archive-subfile-mode 0))))) |
| 549 | 537 | ||
| 550 | ;; Should we use a local copy when accessing from outside Emacs? | 538 | ;; Should we use a local copy when accessing from outside Emacs? |
| @@ -555,7 +543,7 @@ archive. | |||
| 555 | (or archive-remote | 543 | (or archive-remote |
| 556 | (setq archive-remote | 544 | (setq archive-remote |
| 557 | (or (string-match archive-remote-regexp (buffer-file-name)) | 545 | (or (string-match archive-remote-regexp (buffer-file-name)) |
| 558 | (string-match archive-file-name-invalid-regexp | 546 | (string-match file-name-invalid-regexp |
| 559 | (buffer-file-name))))) | 547 | (buffer-file-name))))) |
| 560 | 548 | ||
| 561 | (setq major-mode 'archive-mode) | 549 | (setq major-mode 'archive-mode) |
| @@ -770,7 +758,7 @@ If FNAME is something our underlying filesystem can't grok, or if another | |||
| 770 | file by that name already exists in DIR, a unique new name is generated | 758 | file by that name already exists in DIR, a unique new name is generated |
| 771 | using `make-temp-name', and the generated name is returned." | 759 | using `make-temp-name', and the generated name is returned." |
| 772 | (let ((fullname (expand-file-name fname dir)) | 760 | (let ((fullname (expand-file-name fname dir)) |
| 773 | (alien (string-match archive-file-name-invalid-regexp fname))) | 761 | (alien (string-match file-name-invalid-regexp fname))) |
| 774 | (if (or alien (file-exists-p fullname)) | 762 | (if (or alien (file-exists-p fullname)) |
| 775 | (make-temp-name | 763 | (make-temp-name |
| 776 | (expand-file-name | 764 | (expand-file-name |
| @@ -865,7 +853,7 @@ using `make-temp-name', and the generated name is returned." | |||
| 865 | ;; underlying filesystem, are treated as read-only. | 853 | ;; underlying filesystem, are treated as read-only. |
| 866 | (read-only-p (or archive-read-only | 854 | (read-only-p (or archive-read-only |
| 867 | view-p | 855 | view-p |
| 868 | (string-match archive-file-name-invalid-regexp ename))) | 856 | (string-match file-name-invalid-regexp ename))) |
| 869 | (buffer (get-buffer bufname)) | 857 | (buffer (get-buffer bufname)) |
| 870 | (just-created nil)) | 858 | (just-created nil)) |
| 871 | (if buffer | 859 | (if buffer |