Commit d6f6af81 authored by Katsumi Yamaoka's avatar Katsumi Yamaoka
Browse files

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.
parent 3721e124
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.
......
......@@ -1361,13 +1361,13 @@ the normal Gnus MIME machinery."
(?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)
......
......@@ -2034,6 +2034,24 @@ Same as `string-match' except this function does not change the match data."
(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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment