# HG changeset patch # User Stefan Monnier # Date 1259440131 0 # Node ID 8ba9aa88e9c7a1068793e26da33160db4973569d # Parent 95d84b3cbe43f7c3df4e0c1dd1aeb348942364ce (Man-completion-table): Make it easier to enter " ". diff -r 95d84b3cbe43 -r 8ba9aa88e9c7 lisp/ChangeLog --- a/lisp/ChangeLog Sat Nov 28 20:20:39 2009 +0000 +++ b/lisp/ChangeLog Sat Nov 28 20:28:51 2009 +0000 @@ -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 -r 95d84b3cbe43 -r 8ba9aa88e9c7 lisp/man.el --- a/lisp/man.el Sat Nov 28 20:20:39 2009 +0000 +++ b/lisp/man.el Sat Nov 28 20:28:51 2009 +0000 @@ -789,6 +789,11 @@ (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(".