From: Richard M. Stallman Date: Thu, 19 May 1994 23:06:47 +0000 (+0000) Subject: (completion-setup-function): Make highlight span single spaces. X-Git-Tag: emacs-19.34~8279 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=61bbf6fe72c8634490553b320f1c7ee30a3fbfc1;p=emacs.git (completion-setup-function): Make highlight span single spaces. (choose-completion-delete-max-match): Handle completion-ignore-case. --- diff --git a/lisp/simple.el b/lisp/simple.el index fd2e3c9fbe2..326082318bc 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2450,9 +2450,13 @@ it were the arg to `interactive' (which see) to interactively read the value." (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 @@ Use \\\\[mouse-choose-completion] to select one\ 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)