+2001-12-07 01:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * 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 <zsh@cs.rochester.edu>
* nnweb.el (nnweb-replace-in-string): Removed.
(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.
(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"
(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))))