emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104340: Merge from emacs-23; up to r


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104340: Merge from emacs-23; up to r100585.
Date: Mon, 23 May 2011 20:54:18 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104340 [merge]
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2011-05-23 20:54:18 -0700
message:
  Merge from emacs-23; up to r100585.
modified:
  lisp/ChangeLog
  lisp/mail/sendmail.el
  lisp/mail/smtpmail.el
  lisp/mail/supercite.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-05-24 03:38:35 +0000
+++ b/lisp/ChangeLog    2011-05-24 03:54:18 +0000
@@ -1,3 +1,19 @@
+2011-05-24  Kenichi Handa  <address@hidden>
+
+       * mail/sendmail.el: Require `rfc2047'.
+       (mail-insert-from-field): Do not perform RFC2047 encoding.
+       (mail-encode-header): New function.
+       (sendmail-send-it): Set buffer-file-coding-system of the work
+       buffer to the return value of select-message-coding-system.  Call
+       mail-encode-header.
+
+       * mail/smtpmail.el (smtpmail-send-it): Call mail-encode-header.
+
+2011-05-24  Sean Neakums  <address@hidden>  (tiny change)
+
+       * mail/supercite.el (sc-default-cite-frame): Handle
+       sc-nested-citation-p when sc-cite-blank-lines-p is non-nil.
+
 2011-05-24  Glenn Morris  <address@hidden>
 
        * progmodes/python.el (brm-menu): Declare.

=== modified file 'lisp/mail/sendmail.el'
--- a/lisp/mail/sendmail.el     2011-05-23 17:57:17 +0000
+++ b/lisp/mail/sendmail.el     2011-05-24 03:54:18 +0000
@@ -29,7 +29,7 @@
 ;;; Code:
 (require 'mail-utils)
 
-(autoload 'rfc2047-encode-string "rfc2047")
+(require 'rfc2047)
 
 (defgroup sendmail nil
   "Mail sending commands for Emacs."
@@ -945,12 +945,14 @@
 See also the function `select-message-coding-system'.")
 
 (defun mail-insert-from-field ()
+  "Insert the \"From:\" field of a mail header.
+The style of the field is determined by the variable `mail-from-style'.
+This function does not perform RFC2047 encoding."
   (let* ((login user-mail-address)
         (fullname (user-full-name))
         (quote-fullname nil))
     (if (string-match "[^\0-\177]" fullname)
-       (setq fullname (rfc2047-encode-string fullname)
-             quote-fullname t))
+       (setq quote-fullname t))
     (cond ((null mail-from-style)
           (insert "From: " login "\n"))
          ;; This is deprecated.
@@ -1010,6 +1012,20 @@
                 (goto-char fullname-start))))
           (insert ")\n")))))
 
+(defun mail-encode-header (beg end)
+  "Encode the mail header between BEG and END according to RFC2047.
+Return non-nil if and only if some part of the header is encoded."
+  (save-restriction
+    (narrow-to-region beg end)
+    (let* ((selected (select-message-coding-system))
+          (mm-coding-system-priorities
+           (if (and selected (coding-system-get selected :mime-charset))
+               (cons selected mm-coding-system-priorities)
+             mm-coding-system-priorities))
+          (tick (buffer-chars-modified-tick)))
+      (rfc2047-encode-message-header)
+      (= tick (buffer-chars-modified-tick)))))
+
 ;; Normally you will not need to modify these options unless you are
 ;; using some non-genuine substitute for sendmail which does not
 ;; implement each and every option that the original supports.
@@ -1050,6 +1066,7 @@
          (unless multibyte
            (set-buffer-multibyte nil))
          (insert-buffer-substring mailbuf)
+         (set-buffer-file-coding-system selected-coding)
          (goto-char (point-max))
          ;; require one newline at the end.
          (or (= (preceding-char) ?\n)
@@ -1155,6 +1172,8 @@
            (if mail-interactive
                (with-current-buffer errbuf
                  (erase-buffer))))
+         ;; Encode the header according to RFC2047.
+         (mail-encode-header (point-min) delimline)
          (goto-char (point-min))
          (if (let ((case-fold-search t))
                (or resend-to-addresses

=== modified file 'lisp/mail/smtpmail.el'
--- a/lisp/mail/smtpmail.el     2011-02-12 17:51:02 +0000
+++ b/lisp/mail/smtpmail.el     2011-05-24 03:54:18 +0000
@@ -361,6 +361,8 @@
            (if mail-interactive
                (with-current-buffer errbuf
                  (erase-buffer))))
+         ;; Encode the header according to RFC2047.
+         (mail-encode-header (point-min) delimline)
          ;;
          (setq smtpmail-address-buffer (generate-new-buffer "*smtp-mail*"))
          (setq smtpmail-recipient-address-list

=== modified file 'lisp/mail/supercite.el'
--- a/lisp/mail/supercite.el    2011-01-25 04:08:28 +0000
+++ b/lisp/mail/supercite.el    2011-05-24 03:54:18 +0000
@@ -184,7 +184,9 @@
     ;; paragraph, unless sc-cite-blank-lines-p is non-nil, in which
     ;; case we treat blank lines just like any other line.
     ("^[ \t]*$"                 (if sc-cite-blank-lines-p
-                                   (sc-cite-line)
+                                   (if sc-nested-citation-p
+                                       (sc-add-citation-level)
+                                     (sc-cite-line))
                                  (sc-fill-if-different "")))
     ;; do nothing if looking at a reference tag. make sure that the
     ;; tag string isn't the empty string since this will match every


reply via email to

[Prev in Thread] Current Thread [Next in Thread]