1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 22:41:06 -08:00

* ses.el (macroexp): add require for this package, so that function

`ses--cell gets macroexp-quote.
(ses--cell): makes formula a macroexp-quote of value when formula
is nil. The rationale of this changr is to allow in the future
shorter SES files, e.g. we could have only `(ses-cell A1 1.0)'
instead of `(ses-cell A1 1.0 1.0 nil REFLIST)'. In such a case
reference list REFLIST would be re-computed after load --- thus
trading off load time against file size.

* emacs-lisp/package.el (package--alist-to-plist-args): use
macroexp-quote instead of a lambda expression which has the same
content as macroexp-quote.
(macroexp): add require for this package, so that function
`package--alist-to-plist-args' gets macroexp-quote.

* emacs-lisp/macroexp.el (macroexp-quote): new defun.
This commit is contained in:
Vincent Belaïche 2014-10-25 01:02:25 +02:00
parent ac6839a839
commit b5dc75aed7
4 changed files with 35 additions and 7 deletions

View file

@ -370,6 +370,18 @@ symbol itself."
"Return non-nil if EXP can be copied without extra cost."
(or (symbolp exp) (macroexp-const-p exp)))
(defun macroexp-quote (v)
"Returns an expression E such that `(eval E)' is V.
E is either V or (quote V) depending on whether V evaluates to
itself or not."
(if (and (not (consp v))
(or (keywordp v)
(not (symbolp v))
(memq v '(nil t))))
v
(list 'quote v)))
;;; Load-time macro-expansion.
;; Because macro-expansion used to be more lazy, eager macro-expansion