2009-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
+ * man.el (Man-completion-table): Make it easier to enter "<sec> <name>".
+
* eshell/em-prompt.el (eshell-prompt-function): Abbreviate pwd, since
`cd' doesn't always do it for us (bug#5067).
(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(".