diff options
| author | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-11-28 20:28:51 +0000 |
|---|---|---|
| committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-11-28 20:28:51 +0000 |
| commit | d7117720c988ea26414046f0e0eba9137326f1df (patch) | |
| tree | c93e6246f3a5a94d65505ef080437a43c2ae7d50 /lisp/man.el | |
| parent | 159e3ad54017b598056879885e481fb3b757b3a2 (diff) | |
| download | emacs-d7117720c988ea26414046f0e0eba9137326f1df.tar.gz | |
(Man-completion-table): Make it easier to enter "<sec> <name>".
Diffstat (limited to 'lisp/man.el')
| -rw-r--r-- | lisp/man.el | 5 |
1 files changed, 5 insertions, 0 deletions
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(". |
