[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102566: gnus-util.el (gnus-macroexpa
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102566: gnus-util.el (gnus-macroexpand-all): Allow optional argument `environment'. |
Date: |
Fri, 03 Dec 2010 07:49:34 +0000 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102566
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Fri 2010-12-03 07:49:34 +0000
message:
gnus-util.el (gnus-macroexpand-all): Allow optional argument `environment'.
modified:
lisp/gnus/ChangeLog
lisp/gnus/gnus-util.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2010-12-03 04:39:36 +0000
+++ b/lisp/gnus/ChangeLog 2010-12-03 07:49:34 +0000
@@ -1,6 +1,7 @@
2010-12-03 Katsumi Yamaoka <address@hidden>
- * gnus-util.el (gnus-macroexpand-all): Don't modify argument.
+ * gnus-util.el (gnus-macroexpand-all): Don't modify argument;
+ allow optional argument `environment'.
2010-12-03 Glenn Morris <address@hidden>
=== modified file 'lisp/gnus/gnus-util.el'
--- a/lisp/gnus/gnus-util.el 2010-12-03 04:39:36 +0000
+++ b/lisp/gnus/gnus-util.el 2010-12-03 07:49:34 +0000
@@ -2036,9 +2036,11 @@
(if (fboundp 'macroexpand-all)
(defalias 'gnus-macroexpand-all 'macroexpand-all)
- (defun gnus-macroexpand-all (form)
+ (defun gnus-macroexpand-all (form &optional environment)
"Return result of expanding macros at all levels in FORM.
-If no macros are expanded, FORM is returned unchanged."
+If no macros are expanded, FORM is returned unchanged.
+The second optional arg ENVIRONMENT specifies an environment of macro
+definitions to shadow the loaded ones for use in file byte-compilation."
(if (consp form)
(let ((idx 1)
(len (length (setq form (copy-sequence form))))
@@ -2046,7 +2048,7 @@
(while (< idx len)
(setcar (nthcdr idx form) (gnus-macroexpand-all (nth idx form)))
(setq idx (1+ idx)))
- (if (eq (setq expanded (macroexpand form)) form)
+ (if (eq (setq expanded (macroexpand form environment)) form)
form
(gnus-macroexpand-all expanded)))
form)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102566: gnus-util.el (gnus-macroexpand-all): Allow optional argument `environment'.,
Katsumi Yamaoka <=