Gnus development mailing list
 help / color / mirror / Atom feed
* Customize :package-version keyword
@ 2006-04-19  0:10 Bill Wohler
  2006-04-22  0:14 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Bill Wohler @ 2006-04-19  0:10 UTC (permalink / raw)
  Cc: mh-e-devel

Lars,

Reiner asked me to introduce to you the new :package-version keyword I
recently introduced to Emacs.

The :version keyword (used in defcustom, defgroup, and defface) isn't
very helpful for packages such as MH-E (and probably Gnus as well) which
have releases more often than Emacs. For example, MH-E has had two major
releases and a score of minor releases.

After broaching this subject on emacs-devel
(http://article.gmane.org/gmane.emacs.devel/51453), I ended up
implementing :package-version using ideas provided by Richard. If you
add, for example,

  :package-version '(MH-E . "8.0")

to a variable, and update the new variable
customize-package-emacs-version-alist like this:

  (if (boundp 'customize-package-emacs-version-alist)
      (add-to-list 'customize-package-emacs-version-alist
		   '(MH-E ("6.0" . "22.1") ("6.1" . "22.1") ("7.0" . "22.1")
			  ("7.1" . "22.1") ("7.2" . "22.1") ("7.3" . "22.1")
			  ("7.4" . "22.1") ("8.0" . "22.1"))))

then customize-changed-options will show your options. You also have a
nice table for historical reference. Richard declined to implement a
function at this time to show changed options for a particular package.
The idea was to be able to add the keyword now so that it can be used in
the future.

To provide backwards compatibility, I wrote wrappers for defcustom,
defgroup, and defface which suppress the new keyword on systems that do
not support it (see emacs/lisp/mh-e/mh-e.el). I named them defcustom-mh,
defgroup-mh, and defface-mh (also on Richard's urging) so that they
would be recognized by find-function-search-for-symbol (invoked by
clicking on the filename link in a *Help* buffer). See
http://article.gmane.org/gmane.emacs.devel/52523 for a discussion on
that. Stefan fixed a small bug in that function so that my definitions
could be found. Unfortunately, this link will be broken in other
Emacsen which do not benefit from Stefan's patch.

Naming the wrappers in this fashion also allows them to be recognized by
custom-make-dependencies as long as you load your file with the
definition of those macros.

Finally, to provide highlighting to the developers, I added a call to
mh-font-lock-add-keywords (also in mh-e.el) which is an alias to
font-lock-add-keywords on GNU Emacs, and nil on XEmacs (so the
highlighting doesn't work there).

I think the advantage of adding :package-version keyword now far
outweighs the minor disadvantages of giving up the file link in older
versions of Emacs and syntax highlighting on XEmacs.

Feel free to grab our code.

-- 
Bill Wohler <wohler@newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Customize :package-version keyword
  2006-04-19  0:10 Customize :package-version keyword Bill Wohler
@ 2006-04-22  0:14 ` Lars Magne Ingebrigtsen
  2006-04-22  1:16   ` Bill Wohler
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2006-04-22  0:14 UTC (permalink / raw)
  Cc: mh-e-devel

Bill Wohler <wohler@newt.com> writes:

> The :version keyword (used in defcustom, defgroup, and defface) isn't
> very helpful for packages such as MH-E (and probably Gnus as well) which
> have releases more often than Emacs. For example, MH-E has had two major
> releases and a score of minor releases.

I'm a bit fuzzy on what :version is trying to achieve.  Are users
supposed to list new options that have arrived since some other
version?  And have any users ever done this?  :-)

> After broaching this subject on emacs-devel
> (http://article.gmane.org/gmane.emacs.devel/51453), I ended up
> implementing :package-version using ideas provided by Richard. If you
> add, for example,
>
>   :package-version '(MH-E . "8.0")

Makes sense to me, I think.  On the other hand, I've always considered
the version of Gnus included with Emacs/XEmacs the "real" version,
on the vague idea that most Gnus users uses the pre-packaged version
of Gnus.  (I have no data that supports this notion.  :-)

So I'm not quite sure I feel that this level of detailed user-visible
versioning is required...

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Customize :package-version keyword
  2006-04-22  0:14 ` Lars Magne Ingebrigtsen
@ 2006-04-22  1:16   ` Bill Wohler
  0 siblings, 0 replies; 3+ messages in thread
From: Bill Wohler @ 2006-04-22  1:16 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:

> Bill Wohler <wohler@newt.com> writes:
> 
> > The :version keyword (used in defcustom, defgroup, and defface) isn't
> > very helpful for packages such as MH-E (and probably Gnus as well) which
> > have releases more often than Emacs. For example, MH-E has had two major
> > releases and a score of minor releases.
> 
> I'm a bit fuzzy on what :version is trying to achieve.  Are users
> supposed to list new options that have arrived since some other
> version?  And have any users ever done this?  :-)

If customize-changed-options is new in Emacs 22, probably not ;-). But
yeah, the use of :version (and now :package-version) enables
customize-changed-options to show which options have been added, or have
had their default changed since the last (or selected) version. Think of
it as another way of reading NEWS.

> > After broaching this subject on emacs-devel
> > (http://article.gmane.org/gmane.emacs.devel/51453), I ended up
> > implementing :package-version using ideas provided by Richard. If you
> > add, for example,
> >
> >   :package-version '(MH-E . "8.0")
> 
> Makes sense to me, I think.  On the other hand, I've always considered
> the version of Gnus included with Emacs/XEmacs the "real" version,
> on the vague idea that most Gnus users uses the pre-packaged version
> of Gnus.  (I have no data that supports this notion.  :-)

I don't ;-). Until I started using CVS Emacs, I'd always used a more
up-to-date version than what was packaged with Emacs.

-- 
Bill Wohler <wohler@newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-22  1:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-19  0:10 Customize :package-version keyword Bill Wohler
2006-04-22  0:14 ` Lars Magne Ingebrigtsen
2006-04-22  1:16   ` Bill Wohler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).