aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatsumi Yamaoka2010-12-03 02:17:23 +0000
committerKatsumi Yamaoka2010-12-03 02:17:23 +0000
commitd6f6af81e8f7496f0569daa07745a1b5f01a6fa6 (patch)
tree2e4ca2449ce379fb5b357db9324fea73422c8b25
parent3721e1246a7d23f47976b842c2dc56dc99a103fc (diff)
downloademacs-d6f6af81e8f7496f0569daa07745a1b5f01a6fa6.tar.gz
emacs-d6f6af81e8f7496f0569daa07745a1b5f01a6fa6.zip
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.
-rw-r--r--lisp/gnus/ChangeLog7
-rw-r--r--lisp/gnus/gnus-sum.el6
-rw-r--r--lisp/gnus/gnus-util.el18
3 files changed, 28 insertions, 3 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 8d4b14fa456..1c274a891e5 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,10 @@
12010-12-03 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * gnus-util.el (gnus-macroexpand-all): New function.
4
5 * gnus-sum.el (gnus-summary-line-format-alist): Use gnus-macroexpand-all
6 instead of macroexpand-all that is unavailable in XEmacs.
7
12010-12-02 Andrew Cohen <cohen@andy.bu.edu> 82010-12-02 Andrew Cohen <cohen@andy.bu.edu>
2 9
3 * nnir.el (nnir-summary-line-format): New variable. 10 * nnir.el (nnir-summary-line-format): New variable.
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 840e7d5a000..bb8947b5c86 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -1361,13 +1361,13 @@ the normal Gnus MIME machinery."
1361 (?c (or (mail-header-chars gnus-tmp-header) 0) ?d) 1361 (?c (or (mail-header-chars gnus-tmp-header) 0) ?d)
1362 (?k (gnus-summary-line-message-size gnus-tmp-header) ?s) 1362 (?k (gnus-summary-line-message-size gnus-tmp-header) ?s)
1363 (?L gnus-tmp-lines ?s) 1363 (?L gnus-tmp-lines ?s)
1364 (?Z (or ,(macroexpand-all 1364 (?Z (or ,(gnus-macroexpand-all
1365 '(nnir-article-rsv (mail-header-number gnus-tmp-header))) 1365 '(nnir-article-rsv (mail-header-number gnus-tmp-header)))
1366 0) ?d) 1366 0) ?d)
1367 (?G (or ,(macroexpand-all 1367 (?G (or ,(gnus-macroexpand-all
1368 '(nnir-article-group (mail-header-number gnus-tmp-header))) 1368 '(nnir-article-group (mail-header-number gnus-tmp-header)))
1369 "") ?s) 1369 "") ?s)
1370 (?g (or ,(macroexpand-all 1370 (?g (or ,(gnus-macroexpand-all
1371 '(gnus-group-short-name 1371 '(gnus-group-short-name
1372 (nnir-article-group (mail-header-number gnus-tmp-header)))) 1372 (nnir-article-group (mail-header-number gnus-tmp-header))))
1373 "") ?s) 1373 "") ?s)
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 9deedbeb010..d71035754a7 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -2034,6 +2034,24 @@ Same as `string-match' except this function does not change the match data."
2034 (save-match-data 2034 (save-match-data
2035 (string-match regexp string start)))) 2035 (string-match regexp string start))))
2036 2036
2037(if (fboundp 'macroexpand-all)
2038 (defalias 'gnus-macroexpand-all 'macroexpand-all)
2039 (defun gnus-macroexpand-all (form)
2040 "Return result of expanding macros at all levels in FORM.
2041If no macros are expanded, FORM is returned unchanged."
2042 (if (consp form)
2043 (let ((idx 1)
2044 (len (length form))
2045 elem expanded)
2046 (while (< idx len)
2047 (when (consp (setq elem (nth idx form)))
2048 (setcar (nthcdr idx form) (gnus-macroexpand-all elem)))
2049 (setq idx (1+ idx)))
2050 (if (eq (setq expanded (macroexpand form)) form)
2051 form
2052 (gnus-macroexpand-all expanded)))
2053 form)))
2054
2037(provide 'gnus-util) 2055(provide 'gnus-util)
2038 2056
2039;;; gnus-util.el ends here 2057;;; gnus-util.el ends here