gnus-sum.el (gnus-summary-line-format-alist): Use gnus-macroexpand-all instead of macroexpand-all that is unavailable in XEmacs.
+2010-12-03 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * 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 <cohen@andy.bu.edu>
* nnir.el (nnir-summary-line-format): New variable.
(?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)
(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