From: Stefan Monnier Date: Sat, 28 Nov 2009 20:28:51 +0000 (+0000) Subject: (Man-completion-table): Make it easier to enter " ". X-Git-Tag: emacs-pretest-23.1.90~185 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d7117720c988ea26414046f0e0eba9137326f1df;p=emacs.git (Man-completion-table): Make it easier to enter " ". --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 064ff153757..62f2dc5f4b5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2009-11-28 Stefan Monnier + * man.el (Man-completion-table): Make it easier to enter " ". + * eshell/em-prompt.el (eshell-prompt-function): Abbreviate pwd, since `cd' doesn't always do it for us (bug#5067). diff --git a/lisp/man.el b/lisp/man.el index d40f21c0ca8..de827d89ef6 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -789,6 +789,11 @@ POS defaults to `point'." (push (substring comp 0 (match-beginning 0)) table))) (completion-table-with-context (concat section " ") table prefix pred action)) + ;; If the current text looks like a possible section name, + ;; then add a completion entry that just adds a space so SPC + ;; can be used to insert a space. + (if (string-match "\\`[[:digit:]]" string) + (push (concat string " ") table)) (let ((res (complete-with-action action table string pred))) ;; In case we're completing to a single name that exists in ;; several sections, the longest prefix will look like "foo(".