From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62935 Path: news.gmane.org!not-for-mail From: Bill Wohler Newsgroups: gmane.mail.mh-e.devel,gmane.emacs.gnus.general Subject: Customize :package-version keyword Date: Tue, 18 Apr 2006 17:10:08 -0700 Organization: Newt Software Message-ID: <3518.1145405408@olgas.newt.com> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1145408831 23740 80.91.229.2 (19 Apr 2006 01:07:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 Apr 2006 01:07:11 +0000 (UTC) Cc: mh-e-devel@lists.sourceforge.net Original-X-From: mh-e-devel-admin@lists.sourceforge.net Wed Apr 19 03:07:07 2006 Return-path: Envelope-to: gmmd-mh-e-devel@m.gmane.org Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FW19u-0002AL-Qk for gmmd-mh-e-devel@m.gmane.org; Wed, 19 Apr 2006 03:07:07 +0200 Original-Received: from sc8-sf-list1-b.sourceforge.net (sc8-sf-list1-b.sourceforge.net [10.3.1.7]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id 1AAFE12651; Tue, 18 Apr 2006 18:07:06 -0700 (PDT) Original-Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30) id 1FW19E-0004xP-2Q for mh-e-devel@lists.sourceforge.net; Tue, 18 Apr 2006 18:06:24 -0700 Original-Received: from pop-knobcone.atl.sa.earthlink.net ([207.69.195.64]) by mail.sourceforge.net with esmtp (Exim 4.44) id 1FW19C-0004Bl-O7 for mh-e-devel@lists.sourceforge.net; Tue, 18 Apr 2006 18:06:24 -0700 Original-Received: from h-64-105-34-169.snvacaid.dynamic.covad.net ([64.105.34.169] helo=olgas.newt.com) by pop-knobcone.atl.sa.earthlink.net with esmtp (Exim 3.36 #10) id 1FW19A-0003KA-00; Tue, 18 Apr 2006 21:06:20 -0400 Original-Received: by olgas.newt.com (Postfix, from userid 1000) id 1D6E516FB6; Tue, 18 Apr 2006 17:10:08 -0700 (PDT) Original-Received: from olgas.newt.com (localhost [127.0.0.1]) by olgas.newt.com (Postfix) with ESMTP id 19F9516F9B; Tue, 18 Apr 2006 17:10:08 -0700 (PDT) Original-To: ding@gnus.org X-Mailer: MH-E 7.93+cvs; nmh 1.1; GNU Emacs 22.0.50 X-Image-URL: http://www.newt.com/wohler/images/bill-diving.png Mail-Followup-To: mh-e-devel@lists.sourceforge.net, ding@gnus.org X-Spam-Score: 1.0 (+) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 1.0 FORGED_RCVD_HELO Received: contains a forged HELO Original-Sender: mh-e-devel-admin@lists.sourceforge.net Errors-To: mh-e-devel-admin@lists.sourceforge.net X-BeenThere: mh-e-devel@lists.sourceforge.net X-Mailman-Version: 2.0.9-sf.net Precedence: bulk List-Unsubscribe: , List-Id: Forum for the MH-E developers List-Post: List-Help: List-Subscribe: , List-Archive: X-Original-Date: Tue, 18 Apr 2006 17:10:08 -0700 Xref: news.gmane.org gmane.mail.mh-e.devel:12111 gmane.emacs.gnus.general:62935 Archived-At: 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 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