[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Q: Testing forthe existence of a function
From: |
Ilya Zakharevich |
Subject: |
Re: Q: Testing forthe existence of a function |
Date: |
Tue, 27 Oct 2009 19:08:48 +0000 (UTC) |
User-agent: |
slrn/0.9.8.1pl1 (Linux) |
On 2009-10-27, Giles Chamberlin <giles.chamberlin@tandberg.com> wrote:
> grkuntzmd <grk@usa.net> writes:
>
>> I would like to add a statement of the form
>> (if (defined 'tool-bar-mode) (tool-bar-mode nil))
>
> It's not the function you should be testing for but the feature which
> implements it:
>
> (if (featurep 'tool-bar) ...)
If one want to guard a call to tool-bar-mode(), then one should test
for function tool-bar-mode(), not some [possibly unrelated] feature.
Hope this helps,
Ilya