[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoloading entire function
From: |
Phillip Lord |
Subject: |
Re: autoloading entire function |
Date: |
Mon, 13 Jun 2016 21:07:12 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) |
Glenn Morris <rgm@gnu.org> writes:
> Simply wrap your defun in a progn.
> See eg the examples in Emacs sources such as cvs-dired-noselect
> (simply search for ^(defun in loaddefs.el).
Ah, yes, hadn't thought of that.
Unfortunately, I have another issue. The source file is lexically bound,
and the function uses this feature (it returns closures). This breaks
in the autoload file.
I've tried using eval like so:
;;;###autoload
(eval
(defun fname())
t)
which solves both problems.
Any better way?
Phil