* gnus-sum.el (gnus-summary-remove-list-identifiers): Don't cons
a new string in every iteration. Use shy groups.
2004-01-11 Jesper Harder <harder@ifa.au.dk>
+ * gnus.sum.el (gnus-remove-odd-characters): Don't cons two new
+ strings.
+
+ * mm-util.el (mm-subst-char-in-string): Support inplace.
+
* gnus-sum.el (gnus-summary-remove-list-identifiers): Don't cons
a new string in every iteration. Use shy groups.
"Translate STRING into something that doesn't contain weird characters."
(mm-subst-char-in-string
?\r ?\-
- (mm-subst-char-in-string
- ?\n ?\- string)))
+ (mm-subst-char-in-string ?\n ?\- string t) t))
;; This function has to be called with point after the article number
;; on the beginning of the line.
mm-mime-mule-charset-alist)
nil t))))
(subst-char-in-string
- . (lambda (from to string) ;; stolen (and renamed) from nnheader.el
- "Replace characters in STRING from FROM to TO."
- (let ((string (substring string 0)) ;Copy string.
+ . (lambda (from to string &optional inplace) ;; stolen (and renamed) from nnheader.el
+ "Replace characters in STRING from FROM to TO.
+ Unless optional argument INPLACE is non-nil, return a new string."
+ (let ((string (if inplace string (copy-sequence string)))
(len (length string))
(idx 0))
;; Replace all occurrences of FROM with TO.