help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Is there any elisp functions to tell whether the cursor is in a comm


From: Lennart Borgman (gmail)
Subject: Re: Is there any elisp functions to tell whether the cursor is in a comment block?
Date: Tue, 15 Jul 2008 23:34:27 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Drew Adams wrote:
I am thinking about a page on EmacsWiki that holds the information. This page could for example have entries like

   === Tabkey2.el 21=n 22=y 23=y ===
   elisp:tabkey2.el
   comment ... comment ...

ELPA could then fetch information from this page. And users could too.

The elisp pages on EmacsWiki could at the bottom have a link to this page.
A file-header field in each library file can give the same information. I use this field, for example:

 ;; Compatibility: GNU Emacs 20.x, GNU Emacs 21.x, GNU Emacs 22.x

However, the field value is free-form at present. A conventional form would let tools pick up the value.

An advantage is locality of reference and update: some developers are more likely to update a file header field than
a separate wiki page.
Yes, that might be good too, but it can't be used for packages.

Why not?

If a tool (e.g. ELPA) can pick up the info from a wiki page, as you suggest, why
can't it pick it up from an elisp file (which can also be a wiki page) or a
"package file" or whatever. IOW, whatever info you would provide in the form you
suggested could alternatively be provided in the source code itself. No?

Yes, you are right. It can be done. For a package consisting of several files there can be a file, say this-package-compatibility.el, that contains this information.

For a single elisp file I think the compatibility info can be in the file itself.

So maybe your suggestion is better.

I would suggest a shorter version of the compatibility line, like

  ;; Compatibility: Emacs=20.*,21.*,22.* XEmacs=unknown

I would also suggest adding this information to all elisp files on EmacsWiki. Perhaps this can be done automatically using the dates the files where added and assuming the files only works for the then current released version of Emacs?




reply via email to

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