aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-09-09 07:24:02 +0000
committerRichard M. Stallman1997-09-09 07:24:02 +0000
commitaf898b0f84c3a7bdd048cc3fda4adaec62949567 (patch)
tree1212e34e586e790a1b9ccda6727be42d67397902
parent19d7331338920e903e9ad23a9a3e8dfa9c3d48ff (diff)
downloademacs-af898b0f84c3a7bdd048cc3fda4adaec62949567.tar.gz
emacs-af898b0f84c3a7bdd048cc3fda4adaec62949567.zip
(comint-file-name-chars): Doc fix.
(comint-word): Treat all non-ASCII chars as "[art of word".
-rw-r--r--lisp/comint.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 0027db8b88e..381938b568c 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1926,6 +1926,8 @@ directory tracking functions.")
1926 (t 1926 (t
1927 "~/A-Za-z0-9+@:_.$#%,={}-")) 1927 "~/A-Za-z0-9+@:_.$#%,={}-"))
1928 "String of characters valid in a file name. 1928 "String of characters valid in a file name.
1929Note that all non-ASCII characters are considered valid in a file name
1930regardless of what this variable says.
1929 1931
1930This is a good thing to set in mode hooks.") 1932This is a good thing to set in mode hooks.")
1931 1933
@@ -1945,12 +1947,14 @@ This is a good thing to set in mode hooks.")
1945(defun comint-word (word-chars) 1947(defun comint-word (word-chars)
1946 "Return the word of WORD-CHARS at point, or nil if non is found. 1948 "Return the word of WORD-CHARS at point, or nil if non is found.
1947Word constituents are considered to be those in WORD-CHARS, which is like the 1949Word constituents are considered to be those in WORD-CHARS, which is like the
1948inside of a \"[...]\" (see `skip-chars-forward')." 1950inside of a \"[...]\" (see `skip-chars-forward'),
1951plus all non-ASCII characters."
1949 (save-excursion 1952 (save-excursion
1950 (let ((non-word-chars (concat "[^\\\\" word-chars "]")) (here (point))) 1953 (let ((non-word-chars (concat "[^\\\\" word-chars "]")) (here (point)))
1951 (while (and (re-search-backward non-word-chars nil 'move) 1954 (while (and (re-search-backward non-word-chars nil 'move)
1952 ;(memq (char-after (point)) shell-file-name-quote-list) 1955 ;;(memq (char-after (point)) shell-file-name-quote-list)
1953 (eq (preceding-char) ?\\)) 1956 (or (>= (following-char) 128)
1957 (eq (preceding-char) ?\\)))
1954 (backward-char 1)) 1958 (backward-char 1))
1955 ;; Don't go forward over a word-char (this can happen if we're at bob). 1959 ;; Don't go forward over a word-char (this can happen if we're at bob).
1956 (if (or (not (bobp)) (looking-at non-word-chars)) 1960 (if (or (not (bobp)) (looking-at non-word-chars))