[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: |
Wed, 28 Jan 2009 01:36:03 +0100 |
On Wed, Jan 28, 2009 at 1:02 AM, Juri Linkov <address@hidden> wrote:
>> JL> finder.el scans source files for keywords in comments. So we don't need
>> JL> finder.el with tags in doc strings because it's easy to collect tags from
>> JL> the `documentation' property of all function symbols.
>>
>> You've lost me. Can you please explain with code or point to relevant
>> code?
>
> Something like
>
> (defun my-move-defun ()
> "Docstring.
> @keywords keyword1, keyword2")
>
> (defun my-copy-defun ()
> "Docstring.
> @keywords keyword3, keyword4")
>
> (let (keywordlist docstr)
> (mapatoms
> (lambda (symbol)
> (when (and (functionp symbol) (setq docstr (documentation symbol t))
> (string-match "@keywords \\(.*\\)" docstr))
> (add-to-list 'keywordlist
> (cons symbol (split-string (match-string 1 docstr)
> "\\s-*,\\s-*" t))))))
> keywordlist)
>
> => '((my-copy-defun "keyword3" "keyword4")
> (my-move-defun "keyword1" "keyword2"))
8.4 seconds (evaled) on my pc.
Maybe :keywords is better?
- Re: tags for functions, (continued)
- Re: tags for functions, Glenn Morris, 2009/01/21
- Re: tags for functions, Ted Zlatanov, 2009/01/22
- Re: tags for functions, Juri Linkov, 2009/01/24
- Re: tags for functions, Ted Zlatanov, 2009/01/26
- Re: tags for functions, Juri Linkov, 2009/01/26
- Re: tags for functions, Ted Zlatanov, 2009/01/27
- Re: tags for functions, Juri Linkov, 2009/01/27
- Re: tags for functions,
Lennart Borgman <=
- 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/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