diff options
| author | Richard M. Stallman | 1997-09-09 07:24:02 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-09-09 07:24:02 +0000 |
| commit | af898b0f84c3a7bdd048cc3fda4adaec62949567 (patch) | |
| tree | 1212e34e586e790a1b9ccda6727be42d67397902 | |
| parent | 19d7331338920e903e9ad23a9a3e8dfa9c3d48ff (diff) | |
| download | emacs-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.el | 10 |
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. |
| 1929 | Note that all non-ASCII characters are considered valid in a file name | ||
| 1930 | regardless of what this variable says. | ||
| 1929 | 1931 | ||
| 1930 | This is a good thing to set in mode hooks.") | 1932 | This 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. |
| 1947 | Word constituents are considered to be those in WORD-CHARS, which is like the | 1949 | Word constituents are considered to be those in WORD-CHARS, which is like the |
| 1948 | inside of a \"[...]\" (see `skip-chars-forward')." | 1950 | inside of a \"[...]\" (see `skip-chars-forward'), |
| 1951 | plus 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)) |