comparison lisp/mail/mail-utils.el @ 44033:588b5b177b8a

Eliminate compilation warnings due to `rfc822-addresses'. (rmail-dont-reply-to): Eliminate `pos' as a free variable for a warning free compile.
author Paul Reilly <pmr@pajato.com>
date Wed, 20 Mar 2002 08:08:48 +0000
parents 55bcbf42cf3f
children 0d8b17d428b5
comparison
equal deleted inserted replaced
44032:941cb5b9478a 44033:588b5b177b8a
130 (+ (* 16 (mail-unquote-printable-hexdigit 130 (+ (* 16 (mail-unquote-printable-hexdigit
131 (char-after (match-beginning 1)))) 131 (char-after (match-beginning 1))))
132 (mail-unquote-printable-hexdigit 132 (mail-unquote-printable-hexdigit
133 (char-after (1+ (match-beginning 1))))))) 133 (char-after (1+ (match-beginning 1)))))))
134 t t)))))) 134 t t))))))
135
136 (eval-when-compile (require 'rfc822))
135 137
136 (defun mail-strip-quoted-names (address) 138 (defun mail-strip-quoted-names (address)
137 "Delete comments and quoted strings in an address list ADDRESS. 139 "Delete comments and quoted strings in an address list ADDRESS.
138 Also delete leading/trailing whitespace and replace FOO <BAR> with just BAR. 140 Also delete leading/trailing whitespace and replace FOO <BAR> with just BAR.
139 Return a modified address list." 141 Return a modified address list."
242 (1+ cur-pos)))) 244 (1+ cur-pos))))
243 cur-pos start-pos) 245 cur-pos start-pos)
244 (setq cur-pos (and cur-pos (1+ cur-pos)) 246 (setq cur-pos (and cur-pos (1+ cur-pos))
245 start-pos cur-pos)))))) 247 start-pos cur-pos))))))
246 ;; get rid of any trailing commas 248 ;; get rid of any trailing commas
247 (if (setq pos (string-match "[ ,\t\n]*\\'" destinations)) 249 (let ((pos (string-match "[ ,\t\n]*\\'" destinations)))
248 (setq destinations (substring destinations 0 pos))) 250 (if pos
251 (setq destinations (substring destinations 0 pos))))
249 ;; remove leading spaces. they bother me. 252 ;; remove leading spaces. they bother me.
250 (if (string-match "\\(\\s \\|,\\)*" destinations) 253 (if (string-match "\\(\\s \\|,\\)*" destinations)
251 (substring destinations (match-end 0)) 254 (substring destinations (match-end 0))
252 destinations)) 255 destinations))
253 256