From: "Stefan Monnier <foo@acm.com>" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu>
Subject: Re: detect emacs/xemacs in elisp?
Date: 09 Dec 2002 19:50:23 -0500 [thread overview]
Message-ID: <5l65u2k88g.fsf@rum.cs.yale.edu> (raw)
In-Reply-To: 49e2e83d.0212091030.7c05b32@posting.google.com
>>>>> "Jason" == Jason Addison <jason_addison@hotmail.com> writes:
> I have some elisp that works/doesn't work in emacs/xemacs in my
> ".emacs" file.
You can use
(condition-case nil
(this-is-the thing that might fail)
(error nil))
to tell Emacs to ignore any error that might occur while executing
the form (this-is-the thing that might fail).
If you do (require 'cl) you can equivalently use the following shorthand:
(ignore-errors (this-is-the thing that might fail))
> Another way around this
> would be to know how to determine if a function is defined before
> calling it.
(if (fboundp 'foo)
(foo some arg))
Stefan
prev parent reply other threads:[~2002-12-10 0:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-09 18:30 detect emacs/xemacs in elisp? Jason Addison
2002-12-09 18:52 ` Jesper Harder
2002-12-09 21:57 ` Tim X
2002-12-09 22:19 ` Benjamin Lewis
2002-12-10 0:50 ` Stefan Monnier <foo@acm.com> [this message]
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=5l65u2k88g.fsf@rum.cs.yale.edu \
--to=monnier+gnu.emacs.help/news/@flint.cs.yale.edu \
/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.