help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: finding emacs version


From: Lennart Borgman (gmail)
Subject: Re: finding emacs version
Date: Mon, 14 May 2007 18:41:52 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666

Rustom Mody wrote:
How do you find out which emacs version is running in elisp?

I want to do:

if version is emacs-21
    some code
else
    some other code



Something like this perhaps:

(condition-case err
    (progn
      (cond
       ( (equal emacs-version "21.3.1")
         (setq custom-file "~/.emacs-cust-21.3.el"))
       ( t
         (setq custom-file "~/.emacs-cust-cvs.el")
         ))
      (when (file-exists-p custom-file)
        (load custom-file)))
  (error
(lwarn 'my-emacs :error "Error loading custom:\n %s" (error-message-string err))))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]