[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: when to call provide, first or last?
From: |
Juanma Barranquero |
Subject: |
Re: when to call provide, first or last? |
Date: |
Mon, 27 Feb 2012 13:59:05 +0100 |
On Mon, Feb 27, 2012 at 13:47, Le Wang <address@hidden> wrote:
> Is there some disadvantage to calling it first that I'm not seeing?
Try loading this file my-feature.el:
;;; starts here
(provide 'my-feature)
)
(defun my-function ()
"")
;;; ends here
with emacs -Q -l my-feature.el, and you'll get:
load-with-code-conversion: Invalid read syntax: ")"
(featurep 'my-feature) => t
(fboundp 'my-function) => nil
In other words, having `provide' at the end guarantees that the
feature does not enter the feature list unless the file was correctly
loaded.
Juanma
- when to call provide, first or last?, Le Wang, 2012/02/27
- Re: when to call provide, first or last?,
Juanma Barranquero <=
- Re: when to call provide, first or last?, Le Wang, 2012/02/27
- Re: when to call provide, first or last?, Juanma Barranquero, 2012/02/27
- Re: when to call provide, first or last?, Le Wang, 2012/02/27
- Re: when to call provide, first or last?, Juanma Barranquero, 2012/02/27
- Re: when to call provide, first or last?, Le Wang, 2012/02/27
- RE: when to call provide, first or last?, Drew Adams, 2012/02/27
Re: when to call provide, first or last?, Stefan Monnier, 2012/02/27