changeset 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 941cb5b9478a
children 70012458059d
files lisp/mail/mail-utils.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/mail-utils.el	Wed Mar 20 07:46:46 2002 +0000
+++ b/lisp/mail/mail-utils.el	Wed Mar 20 08:08:48 2002 +0000
@@ -133,6 +133,8 @@
 			      (char-after (1+ (match-beginning 1)))))))
 	   t t))))))
 
+(eval-when-compile (require 'rfc822))
+
 (defun mail-strip-quoted-names (address)
   "Delete comments and quoted strings in an address list ADDRESS.
 Also delete leading/trailing whitespace and replace FOO <BAR> with just BAR.
@@ -244,8 +246,9 @@
 	    (setq cur-pos (and cur-pos (1+ cur-pos))
 		  start-pos cur-pos))))))
   ;; get rid of any trailing commas
-  (if (setq pos (string-match "[ ,\t\n]*\\'" destinations))
-      (setq destinations (substring destinations 0 pos)))
+  (let ((pos (string-match "[ ,\t\n]*\\'" destinations)))
+    (if pos
+        (setq destinations (substring destinations 0 pos))))
   ;; remove leading spaces. they bother me.
   (if (string-match "\\(\\s \\|,\\)*" destinations)
       (substring destinations (match-end 0))