From: Emanuel Berg <incal@dataswamp.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Executing function only if another function is defined
Date: Mon, 25 Jul 2022 03:39:25 +0200 [thread overview]
Message-ID: <87czduhsxe.fsf@dataswamp.org> (raw)
In-Reply-To: N7jzLzG--3-2@tutanota.com
carlmarcos--- via Users list for the GNU Emacs text editor wrote:
> Because it may be possible that some functions are not
> available (e.g. during testing or debugging phases), I would
> like to test whether the function `toucan' has been defined
> before I call `docboost'. What can I do?
>
> (defun toucan-usage ()
> "TODO"
>
> (docboost 'toucan "Usage Information"))
(Why are you using no-break space?)
What you can do?
You can ...
1. `require' the library where "toucan" is defined.
2. Use the hash/sharp-quote, #', instead of just the quote for
toucan. (#' is `function' and ' is `quote' BTW.)
3. Byte-compile. The byte compiler will tell you if toucan
is undefined.
--
underground experts united
https://dataswamp.org/~incal
next prev parent reply other threads:[~2022-07-25 1:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-24 11:35 Executing function only if another function is defined carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-24 14:33 ` [External] : " Drew Adams
[not found] ` <SJ0PR10MB548801BBE63F2CC264989A84F3929@SJ0PR10MB5488.namprd10.prod.outlook.com-N7kcFo0----2>
2022-07-24 15:13 ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-25 1:42 ` Emanuel Berg
2022-07-25 1:39 ` Emanuel Berg [this message]
2022-07-25 8:08 ` help as a function of a NEWS problem (was: Re: Executing function only if another function is defined) Emanuel Berg
2022-07-25 10:24 ` Executing function only if another function is defined carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-25 11:14 ` Emanuel Berg
2022-07-25 11:30 ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-25 11:45 ` Emanuel Berg
2022-07-25 11:51 ` carlmarcos--- via Users list for the GNU Emacs text editor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87czduhsxe.fsf@dataswamp.org \
--to=incal@dataswamp.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.