merge trunk
[bpt/emacs.git] / lisp / mail / sendmail.el
index d685b8b..18d928e 100644 (file)
@@ -1,6 +1,6 @@
-;;; sendmail.el --- mail sending commands for Emacs.  -*- byte-compile-dynamic: t -*-
+;;; sendmail.el --- mail sending commands for Emacs
 
-;; Copyright (C) 1985-1986, 1992-1996, 1998, 2000-2011
+;; Copyright (C) 1985-1986, 1992-1996, 1998, 2000-2012
 ;;   Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
@@ -513,34 +513,40 @@ This also saves the value of `send-mail-function' via Customize."
   ;; a second time, probably because someone's using an old value
   ;; of send-mail-function.
   (when (eq send-mail-function 'sendmail-query-once)
-    (let* ((options `(("Mail client" . mailclient-send-it)
+    (let* ((options `(("mail client" . mailclient-send-it)
                       ,@(when (and sendmail-program
                                    (executable-find sendmail-program))
-                          '(("Mail transport agent" . sendmail-send-it)))
-                      ("SMTP server" . smtpmail-send-it)))
+                          '(("transport" . sendmail-send-it)))
+                      ("smtp" . smtpmail-send-it)))
            (choice
             ;; Query the user.
             (with-temp-buffer
               (rename-buffer "*Emacs Mail Setup Help*" t)
               (insert "\
- Emacs is about to send an email message.  However, it was not configured
- for sending email.  You can instruct Emacs to send email in one of the
- following ways:
-
- - Start your default mail client and pass to it the message text.
-   Type \"Mail client\" at the prompt below to select this option.\n\n")
-             (if (and sendmail-program
-                      (executable-find sendmail-program))
-                 (insert "\
- - Invoke the system's mail transport agent (\"sendmail\").
-   Type \"Mail transport agent\" at the prompt below to select this option.\n\n"))
+ Emacs is about to send an email message, but it has not been
+ configured for sending email.  To tell Emacs how to send email:
+
+ - Type `"
+                     (propertize "mail client" 'face 'bold)
+                     "' to start your default email client and
+   pass it the message text.\n\n")
+             (and sendmail-program
+                  (executable-find sendmail-program)
+                  (insert "\
+ - Type `"
+                          (propertize "transport" 'face 'bold)
+                          "' to invoke the system's mail transport agent
+   (the `"
+                          sendmail-program
+                          "' program).\n\n"))
              (insert "\
- - Send mail directly by communicating with your mail server
-   (this requires setting up SMTP parameters).
-   Type \"SMTP server\" at the prompt below to select this option.
+ - Type `"
+                     (propertize "smtp" 'face 'bold)
+                     "' to send mail directly to an \"outgoing mail\" server.
+   (Emacs may prompt you for SMTP settings).
 
- Emacs will record your selection and will use it thereafter.  To change
your selection later, customize the option `send-mail-function'.\n")
+ Emacs will record your selection and will use it thereafter.
To change it later, customize the option `send-mail-function'.\n")
               (goto-char (point-min))
               (display-buffer (current-buffer))
               (let ((completion-ignore-case t))
@@ -724,6 +730,7 @@ Turning on Mail mode runs the normal hooks `text-mode-hook' and
       (set (make-local-variable 'comment-start-skip)
           (concat "^" (regexp-quote mail-yank-prefix) "[ \t]*")))
   (make-local-variable 'adaptive-fill-regexp)
+  ;; Also update the paragraph-separate entry if you change this.
   (setq adaptive-fill-regexp
        (concat "[ \t]*[-[:alnum:]]+>+[ \t]*\\|"
                adaptive-fill-regexp))
@@ -737,11 +744,14 @@ Turning on Mail mode runs the normal hooks `text-mode-hook' and
   ;; lines that delimit forwarded messages.
   ;; Lines containing just >= 3 dashes, perhaps after whitespace,
   ;; are also sometimes used and should be separators.
-  (setq paragraph-separate (concat (regexp-quote mail-header-separator)
-                               "$\\|\t*\\([-|#;>* ]\\|(?[0-9]+[.)]\\)+$"
-                               "\\|[ \t]*[[:alnum:]]*>+[ \t]*$\\|[ \t]*$\\|"
-                               "--\\( \\|-+\\)$\\|"
-                               page-delimiter)))
+  (setq paragraph-separate
+       (concat (regexp-quote mail-header-separator)
+               ;; This is based on adaptive-fill-regexp (presumably
+               ;; the idea is to allow navigation etc of cited paragraphs).
+               "$\\|\t*[-–!|#%;>*·•‣⁃◦ ]+$"
+               "\\|[ \t]*[-[:alnum:]]*>+[ \t]*$\\|[ \t]*$\\|"
+               "--\\( \\|-+\\)$\\|"
+               page-delimiter)))
 
 
 (defun mail-header-end ()
@@ -1980,4 +1990,9 @@ you can move to one of them and type C-c C-c to recover that one."
 
 (provide 'sendmail)
 
+;; Local Variables:
+;; byte-compile-dynamic: t
+;; coding: utf-8
+;; End:
+
 ;;; sendmail.el ends here