|
From: | Le Wang |
Subject: | Re: when to call provide, first or last? |
Date: | Mon, 27 Feb 2012 21:09:36 +0800 |
On Mon, Feb 27, 2012 at 13:47, Le Wang <address@hidden> wrote:Try loading this file my-feature.el:
> Is there some disadvantage to calling it first that I'm not seeing?
;;; 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
[Prev in Thread] | Current Thread | [Next in Thread] |