From: yamaoka Date: Fri, 7 Dec 2001 13:31:59 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_4-09-quimby-last-~32 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1822f1a902ecb304afee5697021eeab62c77bd99;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index daf23cc..d728874 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2001-12-07 01:00:00 ShengHuo ZHU + + * gnus-sum.el (gnus-summary-print-truncate-and-quote): New. + (gnus-summary-print-article): Use it. + + * gnus-util.el (gnus-replace-in-string): Typo. + 2001-12-06 10:00:00 ShengHuo ZHU * nnweb.el (nnweb-replace-in-string): Removed. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 1a9e778..4413b19 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -7955,6 +7955,13 @@ article. If BACKWARD (the prefix) is non-nil, search backward instead." (when gnus-page-broken (gnus-narrow-to-page)))) +(defun gnus-summary-print-truncate-and-quote (string &optional len) + "Truncate to LEN and quote all \"(\"'s in STRING." + (gnus-replace-in-string (if (and len (> (length string) len)) + (substring string 0 len) + string) + "[()]" "\\\\\\&")) + (defun gnus-summary-print-article (&optional filename n) "Generate and print a PostScript image of the N next (mail) articles. @@ -7984,9 +7991,13 @@ to save in." (let ((ps-left-header (list (concat "(" - (mail-header-subject gnus-current-headers) ")") + (gnus-summary-print-truncate-and-quote + (mail-header-subject gnus-current-headers) + 66) ")") (concat "(" - (mail-header-from gnus-current-headers) ")"))) + (gnus-summary-print-truncate-and-quote + (mail-header-from gnus-current-headers) + 45) ")"))) (ps-right-header (list "/pagenumberstring load" diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index d930ba2..8b4f687 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -60,7 +60,7 @@ (let ((start 0) tail) (while (string-match regexp string start) (setq tail (- (length string) (match-end 0))) - (setq string (replace-match newtext t t string)) + (setq string (replace-match newtext nil literal string)) (setq start (- (length string) tail)))) string))))