From 3d3737886b7f39556cddf0804521a1c44a6f81e3 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Fri, 17 Dec 2010 20:12:54 +0200 Subject: [PATCH] mail/mail-utils.el (mail-strip-quoted-names): Return on all whitespace Organization: Private Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit In ` (mail-strip-quoted-names)' if address is all whitespace, return immediately with nil. In `rmail-dont-reply-to' Add check that `naked-address' is a string. Needed due to change in `mail-strip-quoted-names'. Signed-off-by: Jari Aalto --- lisp/mail/mail-utils.el | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el index a8d8451..7e87276 100644 --- a/lisp/mail/mail-utils.el +++ b/lisp/mail/mail-utils.el @@ -175,7 +175,10 @@ as Rmail does." "Delete comments and quoted strings in an address list ADDRESS. Also delete leading/trailing whitespace and replace FOO with just BAR. Return a modified address list." - (if (null address) + (if (or (null address) + (and (stringp address) + ;; Effectively empty + (string-match "^[[:space:]]*\\'" address))) nil (if mail-use-rfc822 (progn (require 'rfc822) @@ -284,7 +287,8 @@ the comma-separated list. The pruned list is returned." (setq cur-pos start-pos))) (let* ((address (substring destinations start-pos cur-pos)) (naked-address (mail-strip-quoted-names address))) - (if (string-match rmail-dont-reply-to-names naked-address) + (if (and (stringp naked-address) + (string-match rmail-dont-reply-to-names naked-address)) (setq destinations (concat (substring destinations 0 start-pos) (and cur-pos (substring destinations (1+ cur-pos)))) -- 1.7.2.3