* How check when symbol is introduced in Emacs?
@ 2011-01-19 10:23 Oleksandr Gavenko
2011-01-19 14:16 ` suvayu ali
2011-01-19 15:19 ` Eli Zaretskii
0 siblings, 2 replies; 5+ messages in thread
From: Oleksandr Gavenko @ 2011-01-19 10:23 UTC (permalink / raw)
To: help-gnu-emacs
Usually I get Error with previous Emacs version when symbol is undefined.
To workaround I use code like:
(when (or (>= emacs-major-version 23)
(and (= emacs-major-version 22) (>=
emacs-minor-version 2)))
(setq 'symb val)
)
But I must know low limit of version to get better code.
Previously I put version when Emacs don;t fail.
Next I learn to search ChangeLog.
Next I learn use bzr repo with C-x v g and pressing a lot of 'A' command but
it to hard understand which revision goes to release.
Some symbol have properties like :version "20.4". I use it.
Please recommend another simple way or point to docs!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How check when symbol is introduced in Emacs?
2011-01-19 10:23 Oleksandr Gavenko
@ 2011-01-19 14:16 ` suvayu ali
2011-01-19 15:19 ` Eli Zaretskii
1 sibling, 0 replies; 5+ messages in thread
From: suvayu ali @ 2011-01-19 14:16 UTC (permalink / raw)
To: Oleksandr Gavenko; +Cc: help-gnu-emacs
On Wed, Jan 19, 2011 at 11:23 AM, Oleksandr Gavenko
<gavenko@bifit.com.ua> wrote:
> Next I learn use bzr repo with C-x v g and pressing a lot of 'A' command but
> it to hard understand which revision goes to release.
>
If you have a git mirror of the emacs repo,
$ git log -S'<symbol_name>' --graph --oneline | tail -1
should give you the first ever commit which introduces a line with the
symbol name.
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How check when symbol is introduced in Emacs?
[not found] <mailman.4.1295432653.6673.help-gnu-emacs@gnu.org>
@ 2011-01-19 15:15 ` Stefan Monnier
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2011-01-19 15:15 UTC (permalink / raw)
To: help-gnu-emacs
> Usually I get Error with previous Emacs version when symbol is undefined.
> To workaround I use code like:
> (when (or (>= emacs-major-version 23)
> (and (= emacs-major-version 22) (>= emacs-minor-version
> 2)))
> (setq 'symb val)
> )
Bad idea: rather than worry about which Emacs started to provide this
variable, stick to your real problem, which is to figure out whether
your currently running Emacs provides it. And that's easy to do:
(boundp '<symbol>)
will tell you just that. If you want to test the presence of
a function, you can similarly use (fboundp '<symbol>).
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How check when symbol is introduced in Emacs?
2011-01-19 10:23 Oleksandr Gavenko
2011-01-19 14:16 ` suvayu ali
@ 2011-01-19 15:19 ` Eli Zaretskii
2011-01-19 16:02 ` Oleksandr Gavenko
1 sibling, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2011-01-19 15:19 UTC (permalink / raw)
To: help-gnu-emacs
> From: Oleksandr Gavenko <gavenko@bifit.com.ua>
> Date: Wed, 19 Jan 2011 12:23:59 +0200
>
> Usually I get Error with previous Emacs version when symbol is undefined.
>
> To workaround I use code like:
>
> (when (or (>= emacs-major-version 23)
> (and (= emacs-major-version 22) (>=
> emacs-minor-version 2)))
> (setq 'symb val)
> )
>
> But I must know low limit of version to get better code.
Why not use `boundp'?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How check when symbol is introduced in Emacs?
2011-01-19 15:19 ` Eli Zaretskii
@ 2011-01-19 16:02 ` Oleksandr Gavenko
0 siblings, 0 replies; 5+ messages in thread
From: Oleksandr Gavenko @ 2011-01-19 16:02 UTC (permalink / raw)
To: help-gnu-emacs
On 19.01.2011 17:19, Eli Zaretskii wrote:
>> From: Oleksandr Gavenko<gavenko@bifit.com.ua>
>> Date: Wed, 19 Jan 2011 12:23:59 +0200
>>
>> Usually I get Error with previous Emacs version when symbol is undefined.
>>
>> To workaround I use code like:
>>
>> (when (or (>= emacs-major-version 23)
>> (and (= emacs-major-version 22) (>=
>> emacs-minor-version 2)))
>> (setq 'symb val)
>> )
>>
>> But I must know low limit of version to get better code.
>
> Why not use `boundp'?
>
This is interesting tips. I already use this but not always.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-01-19 16:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.4.1295432653.6673.help-gnu-emacs@gnu.org>
2011-01-19 15:15 ` How check when symbol is introduced in Emacs? Stefan Monnier
2011-01-19 10:23 Oleksandr Gavenko
2011-01-19 14:16 ` suvayu ali
2011-01-19 15:19 ` Eli Zaretskii
2011-01-19 16:02 ` Oleksandr Gavenko
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).