emacs-devel
[Top][All Lists]
Advanced

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

Re: defcustom standard value and byte-compilation


From: Stefan Monnier
Subject: Re: defcustom standard value and byte-compilation
Date: Tue, 10 Mar 2015 20:46:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> I just found out that the form defining the standard value of a
> defcustom is not subject to byte-compilation.

IIRC this is not the case if you use lexical-binding.

> The problem with that is that you can't use macros in there without
> having to require the file providing the macro at load-time, too.

Indeed, and the byte-compiler won't warn about unknown functions/vars
and things like that.

> I can use macros in functions and init-forms of defvars and defconsts
> and they are all compiled away, so why shouldn't I allowed to do the
> same for defcustoms?

IIIRC there's a pending bug report about the new behavior in
lexical-binding mode, because when you M-x customize-variable and ask to
see the expression it shows you the byte-compiled gobbledygook instead
of a readable expression.

> Also, I don't find a note on that behavior in the docs.

I don't think it was a conscious decision.


        Stefan



reply via email to

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