emacs-devel
[Top][All Lists]
Advanced

[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?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]