emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp/gnus rfc2047.el ChangeLog


From: Katsumi Yamaoka
Subject: [Emacs-diffs] emacs/lisp/gnus rfc2047.el ChangeLog
Date: Tue, 17 Nov 2009 22:10:42 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Katsumi Yamaoka <yamaoka>       09/11/17 22:10:41

Modified files:
        lisp/gnus      : rfc2047.el ChangeLog 

Log message:
        (rfc2047-decode-region): Don't quote decoded words containing tspecial
         characters if they have been already quoted.  -- Synch with Gnus trunk.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/gnus/rfc2047.el?cvsroot=emacs&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/gnus/ChangeLog?cvsroot=emacs&r1=1.837&r2=1.838

Patches:
Index: rfc2047.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/rfc2047.el,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- rfc2047.el  3 Sep 2009 07:26:32 -0000       1.46
+++ rfc2047.el  17 Nov 2009 22:10:40 -0000      1.47
@@ -1026,6 +1026,7 @@
            ;; things essentially must not be there.
            (while (re-search-forward "[\n\r]+" nil t)
              (replace-match " "))
+           (setq end (point-max))
            ;; Quote decoded words if there are special characters
            ;; which might violate RFC2822.
            (when (and rfc2047-quote-decoded-words-containing-tspecials
@@ -1035,10 +1036,15 @@
                         (when regexp
                           (save-restriction
                             (widen)
+                            (and
+                             ;; Don't quote words if already quoted.
+                             (not (and (eq (char-before e) ?\")
+                                       (eq (char-after end) ?\")))
+                             (progn
                             (beginning-of-line)
                             (while (and (memq (char-after) '(?  ?\t))
                                         (zerop (forward-line -1))))
-                            (looking-at regexp)))))
+                               (looking-at regexp)))))))
              (let (quoted)
                (goto-char e)
                (skip-chars-forward " \t")

Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/ChangeLog,v
retrieving revision 1.837
retrieving revision 1.838
diff -u -b -r1.837 -r1.838
--- ChangeLog   24 Oct 2009 03:42:18 -0000      1.837
+++ ChangeLog   17 Nov 2009 22:10:40 -0000      1.838
@@ -1,3 +1,8 @@
+2009-11-17  Katsumi Yamaoka  <address@hidden>
+
+       * rfc2047.el (rfc2047-decode-region): Don't quote decoded words
+       containing tspecial characters if they have been already quoted.
+
 2009-10-24  Glenn Morris  <address@hidden>
 
        * gnus-art.el (help-xref-stack-item): Define for compiler.




reply via email to

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