From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: chickenphat Newsgroups: gmane.emacs.help Subject: Re: Advice on writing predicates Date: Mon, 29 Jun 2009 12:18:00 -0700 (PDT) Organization: http://groups.google.com Message-ID: <0769d45b-8ac0-4d53-a3eb-6eeb5e0475e7@h18g2000yqj.googlegroups.com> References: <87bpobgann.wl%anselm.helbig+news2009@googlemail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1246337866 23115 80.91.229.12 (30 Jun 2009 04:57:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Jun 2009 04:57:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 30 06:57:39 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MLVPX-000306-Fh for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Jun 2009 06:57:39 +0200 Original-Received: from localhost ([127.0.0.1]:57581 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLVPX-0001It-2Z for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Jun 2009 00:57:39 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!h18g2000yqj.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Original-NNTP-Posting-Host: 199.46.199.232 Original-X-Trace: posting.google.com 1246303082 2882 127.0.0.1 (29 Jun 2009 19:18:02 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 29 Jun 2009 19:18:02 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: h18g2000yqj.googlegroups.com; posting-host=199.46.199.232; posting-account=N8xa1goAAAA0rnp7OsKvjTWL7k1wzUbU User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:170428 X-Mailman-Approved-At: Tue, 30 Jun 2009 00:57:10 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:65642 Archived-At: On Jun 25, 4:23=A0pm, Anselm Helbig wrote: > At Thu, 25 Jun 2009 15:27:19 -0700, > > I hope you're not too disappointed, but there's a constant named > emacs-major-version: > > =A0 (> emacs-major-version 22) > > This is also extracted from the string in emacs-version, this is how > the emacs devs did it: > > =A0 (defconst emacs-major-version > =A0 =A0 (progn (string-match "^[0-9]+" emacs-version) > =A0 =A0 =A0(string-to-number (match-string 0 emacs-version))) > =A0 =A0 "Major version number of this version of Emacs. > =A0 This variable first existed in version 19.23.") > > If you want to parse the version number yourself, this is how I would > do it: > > =A0 (mapcar 'string-to-number (split-string emacs-version "\\.")) > > Note that the emacs-version variable just holds the number. This makes > things a lot easier. This is exactly what I was looking for...and I'm very happy. Thanks. Sarir