emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/gnus/rfc2047.el,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/gnus/rfc2047.el,v
Date: Mon, 11 Sep 2006 14:45:21 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     06/09/11 14:45:20

Index: lisp/gnus/rfc2047.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/rfc2047.el,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- lisp/gnus/rfc2047.el        4 Sep 2006 06:27:27 -0000       1.29
+++ lisp/gnus/rfc2047.el        11 Sep 2006 14:45:19 -0000      1.30
@@ -178,30 +178,32 @@
 matching ENCODABLE-REGEXP."
   (goto-char (point-min))
   (let ((tspecials (concat "[" ietf-drums-tspecials "]"))
-       beg)
+       beg end)
     (with-syntax-table (standard-syntax-table)
       (while (search-forward "\"" nil t)
-       (unless (eq (char-before) ?\\)
-         (setq beg (match-end 0))
-         (goto-char (match-beginning 0))
+       (setq beg (match-beginning 0))
+       (unless (eq (char-before beg) ?\\)
+         (goto-char beg)
+         (setq beg (1+ beg))
          (condition-case nil
              (progn
                (forward-sexp)
-               (save-restriction
-                 (narrow-to-region beg (1- (point)))
+               (setq end (1- (point)))
                  (goto-char beg)
-                 (unless (and encodable-regexp
-                              (re-search-forward encodable-regexp nil t))
+               (if (and encodable-regexp
+                        (re-search-forward encodable-regexp end t))
+                   (goto-char (1+ end))
+                 (save-restriction
+                   (narrow-to-region beg end)
                    (while (re-search-forward tspecials nil 'move)
-                     (unless (and (eq (char-before) ?\\) ;; Already quoted.
-                                  (looking-at tspecials))
+                     (if (eq (char-before) ?\\)
+                         (if (looking-at tspecials) ;; Already quoted.
+                             (forward-char)
+                           (insert "\\"))
                        (goto-char (match-beginning 0))
-                       (unless (or (eq (char-before) ?\\)
-                                   (and rfc2047-encode-encoded-words
-                                        (eq (char-after) ??)
-                                        (eq (char-before) ?=)))
-                         (insert "\\")))
-                     (forward-char)))))
+                       (insert "\\")
+                       (forward-char))))
+                 (forward-char)))
            (error
             (goto-char beg))))))))
 




reply via email to

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