summaryrefslogtreecommitdiff
path: root/lisp/comint.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-08-01 22:34:09 +0000
committerRichard M. Stallman <rms@gnu.org>1996-08-01 22:34:09 +0000
commit96c3e227f7b336bac928df77f875f792c265648e (patch)
tree6dbbc91d93a128482f2a851d9ad69eab230fdf1d /lisp/comint.el
parentcebf9e36239ff25dbdc19cf73f226da0a74e81e9 (diff)
downloademacs-96c3e227f7b336bac928df77f875f792c265648e.tar.gz
(comint-file-name-chars): Was comint-file-name-regexp.
Give it a non-nil default value.
Diffstat (limited to 'lisp/comint.el')
-rw-r--r--lisp/comint.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index fd025e7b358..ae427e48dac 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -119,7 +119,7 @@
;; comint-last-input-match string ...
;; comint-dynamic-complete-functions hook For the completion mechanism
;; comint-completion-fignore list ...
-;; comint-file-name-regexp regexp ...
+;; comint-file-name-chars string ...
;; comint-file-name-quote-list list ...
;; comint-get-old-input function Hooks for specific
;; comint-input-filter-functions hook process-in-a-buffer
@@ -397,7 +397,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
(make-local-variable 'comint-ptyp)
(make-local-variable 'comint-exec-hook)
(make-local-variable 'comint-process-echoes)
- (make-local-variable 'comint-file-name-regexp)
+ (make-local-variable 'comint-file-name-chars)
(make-local-variable 'comint-file-name-quote-list)
(run-hooks 'comint-mode-hook))
@@ -1827,8 +1827,11 @@ Note that this applies to `comint-dynamic-complete-filename' only.")
This is used by comint's and shell's completion functions, and by shell's
directory tracking functions.")
-(defvar comint-file-name-regexp nil
- "Regexp of characters valid in a file name.
+(defvar comint-file-name-chars
+ (if (memq system-type '(ms-dos windows-nt))
+ "~/A-Za-z0-9_^$!#%&{}@`'.()-"
+ "~/A-Za-z0-9+@:_.$#%,={}-")
+ "String of characters valid in a file name.
This is a good thing to set in mode hooks.")
@@ -1884,7 +1887,7 @@ interpreter (e.g., the percent notation of cmd.exe on NT)."
(defun comint-match-partial-filename ()
"Return the filename at point, or nil if non is found.
Environment variables are substituted. See `comint-word'."
- (let ((filename (comint-word comint-file-name-regexp)))
+ (let ((filename (comint-word comint-file-name-chars)))
(and filename (comint-substitute-in-file-name
(comint-unquote-filename filename)))))