changeset 7574:040547adfab2

(completion-setup-function): Make highlight span single spaces. (choose-completion-delete-max-match): Handle completion-ignore-case.
author Richard M. Stallman <rms@gnu.org>
date Thu, 19 May 1994 23:06:47 +0000
parents 059281285df7
children 74474187ad78
files lisp/simple.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Thu May 19 22:45:40 1994 +0000
+++ b/lisp/simple.el	Thu May 19 23:06:47 1994 +0000
@@ -2450,9 +2450,13 @@
 	(len (min (length string)
 		  (- (point) (point-min)))))
     (goto-char (- (point) (length string)))
+    (if completion-ignore-case
+	(setq string (downcase string)))
     (while (and (> len 0)
 		(let ((tail (buffer-substring (point)
 					      (+ (point) len))))
+		  (if completion-ignore-case
+		      (setq tail (downcase tail)))
 		  (not (string= tail (substring string 0 len)))))
       (setq len (1- len))
       (forward-char 1))
@@ -2506,8 +2510,8 @@
 select the completion near point.\n\n"))
       (forward-line 1)
       (if window-system
-	  (while (re-search-forward "[^ \t\n]+" nil t)
-	    (put-text-property (match-beginning 0) (match-end 0)
+	  (while (re-search-forward "[^ \t\n]+\\( [^\t\n]+\\)*" nil t)
+	    (put-text-property (match-beginning 0) (point)
 			       'mouse-face 'highlight))))))
 
 (add-hook 'completion-setup-hook 'completion-setup-function)