emacs-devel
[Top][All Lists]
Advanced

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

Re: when to call provide, first or last?


From: Le Wang
Subject: Re: when to call provide, first or last?
Date: Mon, 27 Feb 2012 21:57:29 +0800

On Mon, Feb 27, 2012 at 9:44 PM, Juanma Barranquero <address@hidden> wrote:
On Mon, Feb 27, 2012 at 14:32, Le Wang <address@hidden> wrote:

> So what?  You have broken code.  Bad things happened, and Emacs is in a bad
> state either way.

No, sorry. One package failing to load does not necessarily leave
"Emacs in a bad state", at least not in theory. That's why
ignore-errors, condition-case and (require x nil t) exist, for
example.

So predictable exceptions are handled by those functions already.  But now things are just borked.
 
Your way makes a bit more difficult to detect the problem, and a bit
more likely that it will be missed and subsequent requires fail
without warning.
 
This is a valid point. 

But, hey, it's your code, put it whenever you think it's right.

Sure.  I'm just trying to clarify what the idiomatic way to use it is.  Maybe a summary of this discussion should be in the manual?
 
> This function announces that feature is now loaded, or being loaded, into the current Emacs session.
>
> NOTE: "or being loaded"

Right. And using your method, you can have a feature that does not
mean that the code is loaded or being loaded.

    Juanma



--
Le

reply via email to

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