[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102589: gnus-util.el (gnus-macroexpa
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102589: gnus-util.el (gnus-macroexpand-all): Use eval-and-compile. |
Date: |
Sun, 05 Dec 2010 23:29:50 +0000 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102589
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Sun 2010-12-05 23:29:50 +0000
message:
gnus-util.el (gnus-macroexpand-all): Use eval-and-compile.
modified:
lisp/gnus/ChangeLog
lisp/gnus/gnus-util.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2010-12-05 22:17:34 +0000
+++ b/lisp/gnus/ChangeLog 2010-12-05 23:29:50 +0000
@@ -1,3 +1,7 @@
+2010-12-05 Katsumi Yamaoka <address@hidden>
+
+ * gnus-util.el (gnus-macroexpand-all): Use eval-and-compile.
+
2010-12-05 Lars Magne Ingebrigtsen <address@hidden>
* gnus-sum.el (gnus-summary-respool-article): The completion function
=== modified file 'lisp/gnus/gnus-util.el'
--- a/lisp/gnus/gnus-util.el 2010-12-05 22:17:34 +0000
+++ b/lisp/gnus/gnus-util.el 2010-12-05 23:29:50 +0000
@@ -2037,25 +2037,26 @@
(save-match-data
(string-match regexp string start))))
-(if (fboundp 'macroexpand-all)
- (defalias 'gnus-macroexpand-all 'macroexpand-all)
- (defun gnus-macroexpand-all (form &optional environment)
- "Return result of expanding macros at all levels in FORM.
+(eval-and-compile
+ (if (fboundp 'macroexpand-all)
+ (defalias 'gnus-macroexpand-all 'macroexpand-all)
+ (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.
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))))
- expanded)
- (while (< idx len)
- (setcar (nthcdr idx form) (gnus-macroexpand-all (nth idx form)
- environment))
- (setq idx (1+ idx)))
- (if (eq (setq expanded (macroexpand form environment)) form)
- form
- (gnus-macroexpand-all expanded environment)))
- form)))
+ (if (consp form)
+ (let ((idx 1)
+ (len (length (setq form (copy-sequence form))))
+ expanded)
+ (while (< idx len)
+ (setcar (nthcdr idx form) (gnus-macroexpand-all (nth idx form)
+ environment))
+ (setq idx (1+ idx)))
+ (if (eq (setq expanded (macroexpand form environment)) form)
+ form
+ (gnus-macroexpand-all expanded environment)))
+ form))))
(provide 'gnus-util)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102589: gnus-util.el (gnus-macroexpand-all): Use eval-and-compile.,
Katsumi Yamaoka <=