[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


reply via email to

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