From: Eli Zaretskii <eliz@elta.co.il>
Subject: Re: alternative to (require ...)
Date: 24 Feb 2004 19:19:15 +0200 [thread overview]
Message-ID: <ueksk4cq4.fsf@elta.co.il> (raw)
In-Reply-To: <20040224163251.5739e4cd@deasker> (message from Sam Halliday on Tue, 24 Feb 2004 16:32:51 +0000)
> From: Sam Halliday <devnull@example.com>
> Newsgroups: gnu.emacs.help
> Date: Tue, 24 Feb 2004 16:32:51 +0000
>
> (require 'htmlize)
>
> but if this package is not installed on the system, emacs bails on loading the
> rest of my ~/.emacs file. this is quite annoying as i like to maintain a single
> ~/.emacs file and use it wherever i am using emacs.
>
> is there an alternative command i can use, which doesn't result in emacs crying
> if it can't find the package? or at least if there is an "if exists" check i
> could do and incorporate into a wrapper function, say called (requests ...)
Use condition-case. Here's an example:
(condition-case err
(require 'saveplace)
(error
(message "Cannot save places %s" (cdr err))))
next prev parent reply other threads:[~2004-02-24 17:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-24 16:32 alternative to (require ...) Sam Halliday
2004-02-24 17:19 ` Eli Zaretskii [this message]
2004-02-24 17:21 ` Kevin Rodgers
2004-02-24 17:36 ` Reiner Steib
2004-02-24 17:40 ` David Kastrup
2004-02-24 18:47 ` Ole Laursen
2004-02-24 21:12 ` Jason Rumney
2004-02-24 22:41 ` Sam Halliday
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ueksk4cq4.fsf@elta.co.il \
--to=eliz@elta.co.il \
/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.
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).