[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: byte compiling defcustom
From: |
Richard Stallman |
Subject: |
Re: byte compiling defcustom |
Date: |
Thu, 15 Nov 2007 23:28:17 -0500 |
(defvar foo (if (featurep 'xemacs) 'bar 'baz) "doc")
(defcustom foo1 (if (featurep 'xemacs) 'bar 'baz) "doc")
Are compiled to:
(defvar foo 'baz (#$ . 543))
(custom-declare-variable 'foo1 '(if (featurep 'xemacs) 'bar 'baz) '(#$ .
581))
The initial value expression for defcustom is saved and gets
recalculated later in some cases. So it cannot in general be
optimized.
This particular simplification could be done even in defcustom, since
(featurep 'xemacs) is effectively a constant. But why bother
to implement that optimization? It works fine as it is now.
- byte compiling defcustom, Dan Nicolaescu, 2007/11/14
- Re: byte compiling defcustom,
Richard Stallman <=
- Re: byte compiling defcustom, Stefan Monnier, 2007/11/16
- Re: byte compiling defcustom, Richard Stallman, 2007/11/16
- Re: byte compiling defcustom, Dan Nicolaescu, 2007/11/17
- Re: byte compiling defcustom, Luc Teirlinck, 2007/11/17
- Re: byte compiling defcustom, Dan Nicolaescu, 2007/11/17
- Re: byte compiling defcustom, Luc Teirlinck, 2007/11/17
- Re: byte compiling defcustom, Luc Teirlinck, 2007/11/17
- Re: byte compiling defcustom, Richard Stallman, 2007/11/18