* how can I find out the emacs version?
@ 2007-08-15 13:01 Tamas Papp
2007-08-15 13:11 ` Sven Joachim
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tamas Papp @ 2007-08-15 13:01 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I would like to find out the version number of my emacs -- I want to
make the font choice in .emacs conditional on whether the version is
smaller than 23 (because from 23, it supports TrueType fonts with xft).
I found emacs-version, but that returns a string. Do you I have to
parse this for the version _number_, or is there another way?
Thanks,
Tamas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how can I find out the emacs version?
2007-08-15 13:01 how can I find out the emacs version? Tamas Papp
@ 2007-08-15 13:11 ` Sven Joachim
2007-08-15 15:52 ` Peter Dyballa
2007-08-15 19:11 ` Reiner Steib
2 siblings, 0 replies; 4+ messages in thread
From: Sven Joachim @ 2007-08-15 13:11 UTC (permalink / raw)
To: help-gnu-emacs
Tamas Papp <tkpapp@gmail.com> writes:
> I would like to find out the version number of my emacs -- I want to
> make the font choice in .emacs conditional on whether the version is
> smaller than 23 (because from 23, it supports TrueType fonts with xft).
>
> I found emacs-version, but that returns a string. Do you I have to
> parse this for the version _number_, or is there another way?
There are emacs-major-version and emacs-minor-version.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how can I find out the emacs version?
2007-08-15 13:01 how can I find out the emacs version? Tamas Papp
2007-08-15 13:11 ` Sven Joachim
@ 2007-08-15 15:52 ` Peter Dyballa
2007-08-15 19:11 ` Reiner Steib
2 siblings, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2007-08-15 15:52 UTC (permalink / raw)
To: Tamas Papp; +Cc: help-gnu-emacs
Am 15.08.2007 um 15:01 schrieb Tamas Papp:
> I found emacs-version, but that returns a string. Do you I have to
> parse this for the version _number_, or is there another way?
You can use
(defconst mEV (emacs-version) "optional info string")
and then
(unless (string-match "Step 8" mEV)
(if (not (string-match "Step 9" mEV))
(if (string-match "22" mEV)
(if (or (string-match "trio" mEV) (string-match "iBook" mEV)
I am fighting with Emacsen of different versions built on different
machines, so emacs-major-version or emacs-minor-version are not
sufficient.
--
Evolutionary greetings
Pete
"Evolution" o __o _o _
°\___o /0~ -\<, ^\___ /=\\_/-%
oo~_______ /\ /\______/ \_________O/ O_______________o===>-->O--o____
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how can I find out the emacs version?
2007-08-15 13:01 how can I find out the emacs version? Tamas Papp
2007-08-15 13:11 ` Sven Joachim
2007-08-15 15:52 ` Peter Dyballa
@ 2007-08-15 19:11 ` Reiner Steib
2 siblings, 0 replies; 4+ messages in thread
From: Reiner Steib @ 2007-08-15 19:11 UTC (permalink / raw)
To: help-gnu-emacs
On Wed, Aug 15 2007, Tamas Papp wrote:
> I would like to find out the version number of my emacs -- I want to
> make the font choice in .emacs conditional on whether the version is
> smaller than 23 (because from 23, it supports TrueType fonts with xft).
Mostly it is better to test for a feature, function or variable
instead of a version number[1]. I don't know which one would be
suitable for XFT.
[1] See...
,----[ (info "(emacs)Init Examples") ]
| * Adjusting the configuration to various platforms and Emacs
| versions.
`----
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-08-15 19:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-15 13:01 how can I find out the emacs version? Tamas Papp
2007-08-15 13:11 ` Sven Joachim
2007-08-15 15:52 ` Peter Dyballa
2007-08-15 19:11 ` Reiner Steib
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 read-only IMAP folder(s) and NNTP newsgroup(s).