comparison lisp/simple.el @ 7594:23edba0a5c5e

(choose-completion): Include words separated by single spaces in the completion.
author Richard M. Stallman <rms@gnu.org>
date Fri, 20 May 1994 22:27:30 +0000
parents 040547adfab2
children b52a92ea3796
comparison
equal deleted inserted replaced
7593:a837cfdcf7c0 7594:23edba0a5c5e
2436 (defun choose-completion () 2436 (defun choose-completion ()
2437 "Choose the completion that point is in or next to." 2437 "Choose the completion that point is in or next to."
2438 (interactive) 2438 (interactive)
2439 (let (beg end) 2439 (let (beg end)
2440 (skip-chars-forward "^ \t\n") 2440 (skip-chars-forward "^ \t\n")
2441 (while (looking-at " [^ \n\t]")
2442 (forward-char 1)
2443 (skip-chars-forward "^ \t\n"))
2441 (setq end (point)) 2444 (setq end (point))
2442 (skip-chars-backward "^ \t\n") 2445 (skip-chars-backward "^ \t\n")
2446 (while (and (= (preceding-char) ?\ )
2447 (not (and (> (point) (1+ (point-min)))
2448 (= (char-after (- (point) 2)) ?\ ))))
2449 (backward-char 1)
2450 (skip-chars-backward "^ \t\n"))
2443 (setq beg (point)) 2451 (setq beg (point))
2444 (choose-completion-string (buffer-substring beg end)))) 2452 (choose-completion-string (buffer-substring beg end))))
2445 2453
2446 ;; Delete the longest partial match for STRING 2454 ;; Delete the longest partial match for STRING
2447 ;; that can be found before POINT. 2455 ;; that can be found before POINT.