all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* proper way to determine emacs version in elisp programing?
@ 2009-08-14  2:52 Xah Lee
  2009-08-14  5:30 ` Teemu Likonen
  0 siblings, 1 reply; 3+ messages in thread
From: Xah Lee @ 2009-08-14  2:52 UTC (permalink / raw)
  To: help-gnu-emacs

what's the proper way to determine emacs version?

i use this code:

(if (string= (substring-no-properties emacs-version 0 2) "23" )
; is 23
; not 23
)

is there more robust way?

thanks.

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: proper way to determine emacs version in elisp programing?
  2009-08-14  2:52 proper way to determine emacs version in elisp programing? Xah Lee
@ 2009-08-14  5:30 ` Teemu Likonen
  2009-08-14 11:18   ` Xah Lee
  0 siblings, 1 reply; 3+ messages in thread
From: Teemu Likonen @ 2009-08-14  5:30 UTC (permalink / raw)
  To: help-gnu-emacs

On 2009-08-13 19:52 (-0700), Xah Lee wrote:
> what's the proper way to determine emacs version?

Variables emacs-major-version and emacs-minor-version. They contain an
integer.

But if you need to check if some feature exists in the system you'd
better check precisely that. For example, check the existence of some
function with (fboundp ...).


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: proper way to determine emacs version in elisp programing?
  2009-08-14  5:30 ` Teemu Likonen
@ 2009-08-14 11:18   ` Xah Lee
  0 siblings, 0 replies; 3+ messages in thread
From: Xah Lee @ 2009-08-14 11:18 UTC (permalink / raw)
  To: help-gnu-emacs

On Aug 13, 10:30 pm, Teemu Likonen <tliko...@iki.fi> wrote:
> On 2009-08-13 19:52 (-0700), Xah Lee wrote:
>
> > what's the proper way to determine emacs version?
>
> Variables emacs-major-version and emacs-minor-version. They contain an
> integer.
>
> But if you need to check if some feature exists in the system you'd
> better check precisely that. For example, check the existence of some
> function with (fboundp ...).

Thanks. Good points.

 Xah


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-14 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-14  2:52 proper way to determine emacs version in elisp programing? Xah Lee
2009-08-14  5:30 ` Teemu Likonen
2009-08-14 11:18   ` Xah Lee

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.