Mercurial > emacs
comparison lisp/comint.el @ 19842:5797c2cbac2a
(comint-file-name-chars): Doc fix.
(comint-word): Treat all non-ASCII chars as "[art of word".
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 09 Sep 1997 07:24:02 +0000 |
parents | aee700a39aea |
children | c03bbe136bd0 |
comparison
equal
deleted
inserted
replaced
19841:d7a4b38557f3 | 19842:5797c2cbac2a |
---|---|
1924 ((eq system-type 'windows-nt) | 1924 ((eq system-type 'windows-nt) |
1925 "~/A-Za-z0-9_^$!#%&{}@`'.,:()-") | 1925 "~/A-Za-z0-9_^$!#%&{}@`'.,:()-") |
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 |
1932 (defvar comint-file-name-quote-list nil | 1934 (defvar comint-file-name-quote-list nil |
1933 "List of characters to quote with `\' when in a file name. | 1935 "List of characters to quote with `\' when in a file name. |
1943 | 1945 |
1944 | 1946 |
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)) |
1957 (forward-char 1)) | 1961 (forward-char 1)) |
1958 ;; Set match-data to match the entire string. | 1962 ;; Set match-data to match the entire string. |