[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tags for functions
From: |
Ted Zlatanov |
Subject: |
Re: tags for functions |
Date: |
Fri, 30 Jan 2009 09:29:15 -0600 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) |
On Thu, 29 Jan 2009 21:32:59 +0100 Lennart Borgman <address@hidden> wrote:
LB> On Thu, Jan 29, 2009 at 2:43 AM, Stefan Monnier
LB> <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.
LB> Is there really any reason not to just collect it while compiling
LB> (using :keywords)? Beside the human work needed ... ;-)
LB> (let ((n 0))
LB> (defun my-keyw ()
LB> (let (keywordlist docstr)
LB> (mapatoms
LB> (lambda (symbol)
LB> (when (functionp symbol)
LB> (setq n (1+ n))
LB> (put symbol 'my-keyw (list 'test 'ing)))))))
LB> (benchmark 1 '(my-keyw))
LB> (message "n=%s" n))
LB> This takes 0.2 s for 12000 functions.
Modifying docstrings is much easier, and does not involve any code
changes anywhere, so I would prefer it as a way of declaring keywords.
Ted
- Re: tags for functions, (continued)
- 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, 2009/01/29
- Re: tags for functions,
Ted Zlatanov <=
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