Bastien <[EMAIL PROTECTED]> writes:

> Carsten Dominik <[EMAIL PROTECTED]> writes:
>
>> I did not realize that erc is not supported on all Emacs versions,
>> to we clearly need to cater for this.  Wither by taking it out
>> of that variable, of my making the require fail silently.
>> We could, for example, wrap the require into condition-case and only
>> pus out a message, not raise a signal.
>
> I have pushed a commit taking this later route.

Slow down... :)

As mentioned orc-irc is meant to be generic so it's still not quite
right. I sent an email to you and Carsten about having a loadablep (bad
name?)  function exposed by the module which would give it a chance to
do some requires and setting up too. Might be interesting to look at the
ERC code and check how they do it...

Here is my (rough) suggestion again:

--8<---------------cut here---------------start------------->8---
 (defun org-load-module (module-name)
   (let ((sym (intern (concat module-name "-loadablep"))))
     (if (fboundp sym)
         (when (funcall sym)
           (require (intern module-name)))
         (error "org modules must have a -loadablep defun."))))
--8<---------------cut here---------------end--------------->8---

Cheers,
Phil
-- 
 Phil Jackson
 http://www.shellarchive.co.uk


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to