[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102554: gnus-util.el (gnus-macroexpa
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102554: gnus-util.el (gnus-macroexpand-all): New function. |
Date: |
Fri, 03 Dec 2010 02:17:23 +0000 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102554
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Fri 2010-12-03 02:17:23 +0000
message:
gnus-util.el (gnus-macroexpand-all): New function.
gnus-sum.el (gnus-summary-line-format-alist): Use gnus-macroexpand-all
instead of macroexpand-all that is unavailable in XEmacs.
modified:
lisp/gnus/ChangeLog
lisp/gnus/gnus-sum.el
lisp/gnus/gnus-util.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2010-12-02 22:21:31 +0000
+++ b/lisp/gnus/ChangeLog 2010-12-03 02:17:23 +0000
@@ -1,3 +1,10 @@
+2010-12-03 Katsumi Yamaoka <address@hidden>
+
+ * gnus-util.el (gnus-macroexpand-all): New function.
+
+ * gnus-sum.el (gnus-summary-line-format-alist): Use gnus-macroexpand-all
+ instead of macroexpand-all that is unavailable in XEmacs.
+
2010-12-02 Andrew Cohen <address@hidden>
* nnir.el (nnir-summary-line-format): New variable.
=== modified file 'lisp/gnus/gnus-sum.el'
--- a/lisp/gnus/gnus-sum.el 2010-12-02 22:21:31 +0000
+++ b/lisp/gnus/gnus-sum.el 2010-12-03 02:17:23 +0000
@@ -1361,13 +1361,13 @@
(?c (or (mail-header-chars gnus-tmp-header) 0) ?d)
(?k (gnus-summary-line-message-size gnus-tmp-header) ?s)
(?L gnus-tmp-lines ?s)
- (?Z (or ,(macroexpand-all
+ (?Z (or ,(gnus-macroexpand-all
'(nnir-article-rsv (mail-header-number gnus-tmp-header)))
0) ?d)
- (?G (or ,(macroexpand-all
+ (?G (or ,(gnus-macroexpand-all
'(nnir-article-group (mail-header-number gnus-tmp-header)))
"") ?s)
- (?g (or ,(macroexpand-all
+ (?g (or ,(gnus-macroexpand-all
'(gnus-group-short-name
(nnir-article-group (mail-header-number gnus-tmp-header))))
"") ?s)
=== modified file 'lisp/gnus/gnus-util.el'
--- a/lisp/gnus/gnus-util.el 2010-11-16 00:04:25 +0000
+++ b/lisp/gnus/gnus-util.el 2010-12-03 02:17:23 +0000
@@ -2034,6 +2034,24 @@
(save-match-data
(string-match regexp string start))))
+(if (fboundp 'macroexpand-all)
+ (defalias 'gnus-macroexpand-all 'macroexpand-all)
+ (defun gnus-macroexpand-all (form)
+ "Return result of expanding macros at all levels in FORM.
+If no macros are expanded, FORM is returned unchanged."
+ (if (consp form)
+ (let ((idx 1)
+ (len (length form))
+ elem expanded)
+ (while (< idx len)
+ (when (consp (setq elem (nth idx form)))
+ (setcar (nthcdr idx form) (gnus-macroexpand-all elem)))
+ (setq idx (1+ idx)))
+ (if (eq (setq expanded (macroexpand form)) form)
+ form
+ (gnus-macroexpand-all expanded)))
+ form)))
+
(provide 'gnus-util)
;;; gnus-util.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102554: gnus-util.el (gnus-macroexpand-all): New function.,
Katsumi Yamaoka <=