summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-05-20 22:27:30 +0000
committerRichard M. Stallman <rms@gnu.org>1994-05-20 22:27:30 +0000
commit2d2eeace3b81236793dc26491a8abcaa1385c878 (patch)
tree3eddb9a5f755ef1966c5cffd398b5cef1d9fb7f8
parentb6be5d958462e70e0b66b9cc66b1ad3558e46fb9 (diff)
downloademacs-2d2eeace3b81236793dc26491a8abcaa1385c878.tar.gz
(choose-completion):
Include words separated by single spaces in the completion.
-rw-r--r--lisp/simple.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 326082318bc..5f58d18e74e 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2438,8 +2438,16 @@ it were the arg to `interactive' (which see) to interactively read the value."
(interactive)
(let (beg end)
(skip-chars-forward "^ \t\n")
+ (while (looking-at " [^ \n\t]")
+ (forward-char 1)
+ (skip-chars-forward "^ \t\n"))
(setq end (point))
(skip-chars-backward "^ \t\n")
+ (while (and (= (preceding-char) ?\ )
+ (not (and (> (point) (1+ (point-min)))
+ (= (char-after (- (point) 2)) ?\ ))))
+ (backward-char 1)
+ (skip-chars-backward "^ \t\n"))
(setq beg (point))
(choose-completion-string (buffer-substring beg end))))