;;; mail-utils.el --- utility functions used both by rmail and rnews
-;; Copyright (C) 1985 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 2001 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: mail, news
(while (setq pos (string-match "\\(,\\s-*\\|\\`\\)\\([^,]*<\\([^>,:]*\\)>[^,]*\\)\\(\\s-*,\\|\\'\\)"
address))
(setq address (replace-match (match-string 3 address)
- nil nil address 2)))
+ nil 'literal address 2)))
address))))
; rmail-dont-reply-to-names is defined in loaddefs
"\\)[^,]*"))
(case-fold-search t)
pos epos)
- (while (setq pos (string-match match userids pos))
+ (while (and (setq pos (string-match match userids pos))
+ (> (length userids) 0))
;; If there's a match, it starts at the beginning of the string,
;; or with `,'. We must delete from that position to the
;; end of the user-id which starts at match-beginning 2.