[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tags for functions
From: |
Lennart Borgman |
Subject: |
Re: tags for functions |
Date: |
Thu, 29 Jan 2009 21:32:59 +0100 |
On Thu, Jan 29, 2009 at 2:43 AM, Stefan Monnier
<address@hidden> wrote:
>> Juri's solution is slow, as Lennart noted, due to the `documentation'
>> issue you mentioned. I said I think a defun-after-hook would be the
>> best solution. Maybe it should be combined with a etc/DOC scan to find
>> all the existing keywords quickly.
>
> In any case, we don't want to collect/store this info all the time: we
> only want to pay for it when this data is actually used.
Is there really any reason not to just collect it while compiling
(using :keywords)? Beside the human work needed ... ;-)
(let ((n 0))
(defun my-keyw ()
(let (keywordlist docstr)
(mapatoms
(lambda (symbol)
(when (functionp symbol)
(setq n (1+ n))
(put symbol 'my-keyw (list 'test 'ing)))))))
(benchmark 1 '(my-keyw))
(message "n=%s" n))
This takes 0.2 s for 12000 functions.
- Re: tags for functions, (continued)
- Re: tags for functions, Ted Zlatanov, 2009/01/28
- Re: tags for functions, Stefan Monnier, 2009/01/28
- Re: tags for functions, Ted Zlatanov, 2009/01/29
- Re: tags for functions, Stefan Monnier, 2009/01/29
- Re: tags for functions, Ted Zlatanov, 2009/01/30
- RE: tags for functions, Drew Adams, 2009/01/30
- Re: tags for functions, Ted Zlatanov, 2009/01/30
- Re: tags for functions, Juri Linkov, 2009/01/31
- Re: tags for functions, Stefan Monnier, 2009/01/30
- RE: tags for functions, Drew Adams, 2009/01/30
- Re: tags for functions,
Lennart Borgman <=
- Re: tags for functions, Ted Zlatanov, 2009/01/30
Re: tags for functions, MON KEY, 2009/01/22
Re: tags for functions, S+*n_Pe*rm*n, 2009/01/22
Re: tags for functions, S+*n_Pe*rm*n, 2009/01/23