diff options
| author | Richard M. Stallman | 1994-05-19 23:06:47 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-19 23:06:47 +0000 |
| commit | 61bbf6fe72c8634490553b320f1c7ee30a3fbfc1 (patch) | |
| tree | c2ec83bc8d26f9719b2ecb363e56c53e4552639e | |
| parent | acf3b6865a24e9cf244af490bda5259d9c306f04 (diff) | |
| download | emacs-61bbf6fe72c8634490553b320f1c7ee30a3fbfc1.tar.gz emacs-61bbf6fe72c8634490553b320f1c7ee30a3fbfc1.zip | |
(completion-setup-function): Make highlight span single spaces.
(choose-completion-delete-max-match): Handle completion-ignore-case.
| -rw-r--r-- | lisp/simple.el | 8 |
1 files changed, 6 insertions, 2 deletions
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." | |||
| 2450 | (len (min (length string) | 2450 | (len (min (length string) |
| 2451 | (- (point) (point-min))))) | 2451 | (- (point) (point-min))))) |
| 2452 | (goto-char (- (point) (length string))) | 2452 | (goto-char (- (point) (length string))) |
| 2453 | (if completion-ignore-case | ||
| 2454 | (setq string (downcase string))) | ||
| 2453 | (while (and (> len 0) | 2455 | (while (and (> len 0) |
| 2454 | (let ((tail (buffer-substring (point) | 2456 | (let ((tail (buffer-substring (point) |
| 2455 | (+ (point) len)))) | 2457 | (+ (point) len)))) |
| 2458 | (if completion-ignore-case | ||
| 2459 | (setq tail (downcase tail))) | ||
| 2456 | (not (string= tail (substring string 0 len))))) | 2460 | (not (string= tail (substring string 0 len))))) |
| 2457 | (setq len (1- len)) | 2461 | (setq len (1- len)) |
| 2458 | (forward-char 1)) | 2462 | (forward-char 1)) |
| @@ -2506,8 +2510,8 @@ Use \\<completion-list-mode-map>\\[mouse-choose-completion] to select one\ | |||
| 2506 | select the completion near point.\n\n")) | 2510 | select the completion near point.\n\n")) |
| 2507 | (forward-line 1) | 2511 | (forward-line 1) |
| 2508 | (if window-system | 2512 | (if window-system |
| 2509 | (while (re-search-forward "[^ \t\n]+" nil t) | 2513 | (while (re-search-forward "[^ \t\n]+\\( [^\t\n]+\\)*" nil t) |
| 2510 | (put-text-property (match-beginning 0) (match-end 0) | 2514 | (put-text-property (match-beginning 0) (point) |
| 2511 | 'mouse-face 'highlight)))))) | 2515 | 'mouse-face 'highlight)))))) |
| 2512 | 2516 | ||
| 2513 | (add-hook 'completion-setup-hook 'completion-setup-function) | 2517 | (add-hook 'completion-setup-hook 'completion-setup-function) |