changeset 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 d7a4b38557f3
children 0c9342c1054d
files lisp/comint.el
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/comint.el	Tue Sep 09 07:09:20 1997 +0000
+++ b/lisp/comint.el	Tue Sep 09 07:24:02 1997 +0000
@@ -1926,6 +1926,8 @@
    (t   
     "~/A-Za-z0-9+@:_.$#%,={}-"))
   "String of characters valid in a file name.
+Note that all non-ASCII characters are considered valid in a file name
+regardless of what this variable says.
 
 This is a good thing to set in mode hooks.")
 
@@ -1945,12 +1947,14 @@
 (defun comint-word (word-chars)
   "Return the word of WORD-CHARS at point, or nil if non is found.
 Word constituents are considered to be those in WORD-CHARS, which is like the
-inside of a \"[...]\" (see `skip-chars-forward')."
+inside of a \"[...]\" (see `skip-chars-forward'),
+plus all non-ASCII characters."
   (save-excursion
     (let ((non-word-chars (concat "[^\\\\" word-chars "]")) (here (point)))
       (while (and (re-search-backward non-word-chars nil 'move)
-		  ;(memq (char-after (point)) shell-file-name-quote-list)
-		  (eq (preceding-char) ?\\))
+		  ;;(memq (char-after (point)) shell-file-name-quote-list)
+		  (or (>= (following-char) 128)
+		      (eq (preceding-char) ?\\)))
 	(backward-char 1))
       ;; Don't go forward over a word-char (this can happen if we're at bob).
       (if (or (not (bobp)) (looking-at non-word-chars))