emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tags for functions


From: Juri Linkov
Subject: Re: tags for functions
Date: Sun, 25 Jan 2009 02:32:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

>>> 1) build a list of command keywords quickly (using each package's
>>> Keywords?)
>>>
>>> 2) refine the keywords into a simple taxonomy that is not too big nor
>>> too small.
>
> GM> Just because I haven't seen finder mentioned yet in this dicussion,
> GM> M-x finder-list-keywords already tries to do something related to
> GM> the above.
>
> Great, that saves me a lot of work.  I can just hook into it and get the
> global list of keywords and the packages which use each one.  Very
> useful.  The work then becomes:
>
> 1) figure out place to store keywords (symbol plist or global)
> 2) add :keywords to defun and defvar, etc. as needed
> 3) figure out keywords for each function (and symbol?) based on package
> 4) refine and grow the tag space, figure out synonym rings

finder.el extracts package keywords from the comments in the file header.
Doing the same for function keywords means placing them in the comments
before the function definition.  Many modern programming languages use the
@-syntax for documentation tags.  So for Emacs Lisp they could look like:

;; @tag1
;; @tag2
(defun my-move-defun ()
  "Docstring."
  ...)

However, since Emacs uses doc strings for documentation it would be better
to add them in doc strings like:

(defun my-move-defun ()
  "Docstring.
@tag1
@tag2"
  ...)

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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