help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alternative to (require ...)


From: David Kastrup
Subject: Re: alternative to (require ...)
Date: 24 Feb 2004 18:40:46 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Sam Halliday <address@hidden> writes:

> most of the 3rd party packages i have for emacs (such as
> color-theme, php-mode, htmlize) are loaded in my ~/.emacs file by
> statements such as
> 
>   (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 ...)

(condition-case nil
   (require 'htmlize)
  (error (message "Skipping load of htmlize")))

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

[Prev in Thread] Current Thread [Next in Thread]