X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fmessage.el;h=d93c05c361b97bfa45be345df365d8a6d1a82b26;hb=f2f6e1e4a2f6e7d4add61e43ba92732fe8c58dbf;hp=1ba4abdec1fcba9f383913ed8f639856b5c205bc;hpb=30eb6d24d30bc028fce91a0c62044c5dc1fdd90e;p=gnus diff --git a/lisp/message.el b/lisp/message.el index 1ba4abdec..d93c05c36 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1,7 +1,7 @@ ;;; message.el --- composing mail and news messages ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: mail, news @@ -1228,14 +1228,11 @@ called and its result is inserted." (if (and (string-match "sparc-sun-sunos\\(\\'\\|[^5]\\)" system-configuration) (file-readable-p "/etc/sendmail.cf") - (let ((buffer (get-buffer-create " *temp*"))) - (unwind-protect - (with-current-buffer buffer - (insert-file-contents "/etc/sendmail.cf") - (goto-char (point-min)) - (let ((case-fold-search nil)) - (re-search-forward "^OR\\>" nil t))) - (kill-buffer buffer)))) + (with-temp-buffer + (insert-file-contents "/etc/sendmail.cf") + (goto-char (point-min)) + (let ((case-fold-search nil)) + (re-search-forward "^OR\\>" nil t)))) ;; According to RFC822, "The field-name must be composed of printable ;; ASCII characters (i. e., characters that have decimal values between ;; 33 and 126, except colon)", i. e., any chars except ctl chars, @@ -4175,7 +4172,6 @@ not have PROP." (nreverse regions))) (defcustom message-bogus-addresses - ;; '("noreply" "nospam" "invalid") '("noreply" "nospam" "invalid" "@@" "[^[:ascii:]].*@" "[ \t]") "List of regexps of potentially bogus mail addresses. See `message-check-recipients' how to setup checking. @@ -4341,7 +4337,17 @@ This function could be useful in `message-setup-hook'." (and bog (not (y-or-n-p (format - "Address `%s' might be bogus. Continue? " bog))) + "Address `%s'%s might be bogus. Continue? " + bog + ;; If the encoded version of the email address + ;; is different from the unencoded version, + ;; then we likely have invisible characters or + ;; the like. Display the encoded version, + ;; too. + (let ((encoded (rfc2047-encode-string bog))) + (if (string= encoded bog) + "" + (format " (%s)" encoded)))))) (error "Bogus address")))))))) (custom-add-option 'message-setup-hook 'message-check-recipients) @@ -6556,7 +6562,13 @@ is a function used to switch to and display the mail buffer." (message-setup (nconc `((To . ,(or to "")) (Subject . ,(or subject ""))) - (when other-headers other-headers)) + ;; C-h f compose-mail says that headers should be specified as + ;; (string . value); however all the rest of message expects + ;; headers to be symbols, not strings (eg message-header-format-alist). + ;; http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg00337.html + ;; We need to convert any string input, eg from rmail-start-mail. + (dolist (h other-headers other-headers) + (if (stringp (car h)) (setcar h (intern (capitalize (car h))))))) yank-action send-actions continue switch-function return-action) ;; FIXME: Should return nil if failure.