From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: checking emacs version Date: Tue, 24 Feb 2009 06:07:32 +0200 Message-ID: References: <643cd3d3-5a51-41ce-b830-b71f27b59666@h5g2000yqh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1235448484 25875 80.91.229.12 (24 Feb 2009 04:08:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Feb 2009 04:08:04 +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 Feb 24 05:09:19 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 1Lbobe-0002ZG-Ic for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Feb 2009 05:09:18 +0100 Original-Received: from localhost ([127.0.0.1]:57608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LboaJ-0001YW-N2 for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Feb 2009 23:07:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LboZz-0001XW-D5 for help-gnu-emacs@gnu.org; Mon, 23 Feb 2009 23:07:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LboZy-0001XK-OC for help-gnu-emacs@gnu.org; Mon, 23 Feb 2009 23:07:35 -0500 Original-Received: from [199.232.76.173] (port=44573 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LboZy-0001XH-H7 for help-gnu-emacs@gnu.org; Mon, 23 Feb 2009 23:07:34 -0500 Original-Received: from mtaout2.012.net.il ([84.95.2.4]:16918) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LboZy-0005yd-2J for help-gnu-emacs@gnu.org; Mon, 23 Feb 2009 23:07:34 -0500 Original-Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KFJ00G00XTEAB00@i_mtaout2.012.net.il> for help-gnu-emacs@gnu.org; Tue, 24 Feb 2009 06:08:07 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.126.160.251]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KFJ00J6KY5IYHX2@i_mtaout2.012.net.il> for help-gnu-emacs@gnu.org; Tue, 24 Feb 2009 06:08:07 +0200 (IST) In-reply-to: <643cd3d3-5a51-41ce-b830-b71f27b59666@h5g2000yqh.googlegroups.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 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:62306 Archived-At: > From: Eric > Date: Mon, 23 Feb 2009 18:59:43 -0800 (PST) > > I'm writing an .emacs file that will need to work under a few > different versions of emacs, and wanted to ask what the most reliable > method of checking the current emacs version. Is a simple string > search in (emacs-version) acceptable, or is there a more robust way of > doing it? You can do as simple as (if (>= emacs-major-version 21) (do-something)) or more sophisticated (if (version<= 23.0.98) (do-something-else)) Is that what you are looking for?