all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric <girzel@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: checking emacs version
Date: Mon, 23 Feb 2009 21:19:12 -0800 (PST)	[thread overview]
Message-ID: <e6af585e-eb43-4d2e-b11c-8aa3edca82ab@f20g2000yqg.googlegroups.com> (raw)
In-Reply-To: barmar-975057.23361523022009@mara100-84.onlink.net

On Feb 24, 12:36 pm, Barry Margolin <bar...@alum.mit.edu> wrote:
> In article
> <0cda7201-96b3-4625-a760-f5548658e...@l16g2000yqo.googlegroups.com>,
>
>
>
>
>
>  Eric <gir...@gmail.com> wrote:
> > On Feb 24, 12:07 pm, Eli Zaretskii <e...@gnu.org> wrote:
> > > > From: Eric <gir...@gmail.com>
> > > > 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?
>
> > No, sorry! I totally failed to say what I was actually doing -- not
> > checking emacs versions but checking emacs ports: I use Carbon Emacs
> > on my mac at home, and vanilla emacs on my server, and want to set
> > some Carbon-specific variables when I'm at home. The string "Carbon"
> > show up in (emacs-version), that's why I was thinking that might be
> > how I have to do it.
>
> Are you sure you need to conditionalize on that, rather than something
> more generic?  E.g.
>
> (if (eq window-system 'mac)
>     (do-something))
>
> --
> Barry Margolin, bar...@alum.mit.edu
> Arlington, MA
> *** PLEASE post questions in newsgroups, not directly to me ***
> *** PLEASE don't copy me on replies, I'll read them in the group ***

I'm not sure at all, and that's why I was asking! This is helpful,
I'll take a look at this and see what's more appropriate to use. I
think there are some variables that are specific to Carbon (ie the
name actually starts with carbon), but window system might be better
for more general stuff.

Thanks a lot!
Eric


  reply	other threads:[~2009-02-24  5:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-24  2:59 checking emacs version Eric
2009-02-24  4:07 ` Eli Zaretskii
     [not found] ` <mailman.1610.1235448457.31690.help-gnu-emacs@gnu.org>
2009-02-24  4:21   ` Eric
2009-02-24  4:36     ` Barry Margolin
2009-02-24  5:19       ` Eric [this message]
2009-02-24 14:29     ` Jonathan Groll
     [not found]     ` <mailman.1644.1235485784.31690.help-gnu-emacs@gnu.org>
2009-02-24 15:23       ` Eric
2009-02-24  9:35 ` Leo
2009-02-24 17:58   ` Peter Dyballa
     [not found] ` <mailman.1636.1235468408.31690.help-gnu-emacs@gnu.org>
2009-02-24 17:40   ` Colin S. Miller
2009-02-24 18:37 ` Pascal J. Bourguignon
2009-02-24 22:02   ` Peter Dyballa
     [not found]   ` <mailman.1685.1235512964.31690.help-gnu-emacs@gnu.org>
2009-02-25  4:34     ` Pascal J. Bourguignon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e6af585e-eb43-4d2e-b11c-8aa3edca82ab@f20g2000yqg.googlegroups.com \
    --to=girzel@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.