[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#3717: M-x man completion
From: |
Kevin Ryde |
Subject: |
bug#3717: M-x man completion |
Date: |
Thu, 17 Dec 2009 08:44:02 +1100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) |
I wrote:
>
> insinuate "-k " and "-l " so it's possible to type those things
> without needing C-q Space.
I've since thought to help any "-" option, not just -k and -l, with a
constructed table in the completion handler along these lines.
Not sure it's fantastic for "?" or "tab", but gets the right effect on
space.
((string-match "\\`-\\(.\\)?" str)
;; "-" or "-X" -- alone and with a space so you don't have to type
;; C-q space after an option. "-l" or "-k" are shown as standard
;; options, but then add anything else so other options can be
;; typed.
;;
;; For formatting options like "-Tascii" could think about applying
;; the pagename or filename completion to the next arg, but
;; normally such options will go in `Man-switches'.
;;
(let ((table '(("-l " . "run man on a file")
("-k " . "search apropos database"))))
(unless (member str '("-k" "-l" "-k " "-l "))
(push (cons str "option") table)
(push (cons (concat str " ") "option") table))
(man-completion--complete-with-action action table str pred)))
- bug#3717: M-x man completion, (continued)
bug#3717: M-x man completion, jidanni, 2009/12/15
- bug#3717: M-x man completion, Eli Zaretskii, 2009/12/15
- bug#3717: M-x man completion, Juri Linkov, 2009/12/15
- bug#3717: M-x man completion, Eli Zaretskii, 2009/12/15
- bug#3717: M-x man completion, Kevin Ryde, 2009/12/16
- Message not available
- Message not available
- bug#3717: M-x man completion, Juri Linkov, 2009/12/17
- bug#3717: M-x man completion, Kevin Ryde, 2009/12/17
bug#3717: M-x man completion, Kevin Ryde, 2009/12/16
bug#3717: M-x man completion,
Kevin Ryde <=