summaryrefslogtreecommitdiff
path: root/lisp/gnus/rfc2047.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2006-09-11 14:45:20 +0000
committerMiles Bader <miles@gnu.org>2006-09-11 14:45:20 +0000
commitb110774acbba4db95baf6c666769f3bc2a0269b6 (patch)
tree57262452db450d8482b27a5e40af07f04338ce86 /lisp/gnus/rfc2047.el
parent4e963ca8161e987565c0fd40fd72d80caa59d1a0 (diff)
downloademacs-b110774acbba4db95baf6c666769f3bc2a0269b6.tar.gz
Merge from gnus--rel--5.10
Patches applied: * gnus--rel--5.10 (patch 136) - Update from CVS 2006-09-09 Reiner Steib <Reiner.Steib@gmx.de> * lisp/gnus/pop3.el (pop3-leave-mail-on-server): Mention problem of duplicate mails in the doc string. Add some URLs in comment. 2006-09-07 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/rfc2047.el (rfc2047-quote-special-characters-in-quoted-strings): Fix backslashes handling and the way to find boundaries of quoted strings. 2006-09-09 Reiner Steib <Reiner.Steib@gmx.de> * man/gnus.texi (Mail Source Specifiers): Mention problem of duplicate mails with pop3-leave-mail-on-server. Fix wording. Revision: emacs@sv.gnu.org/emacs--devo--0--patch-431
Diffstat (limited to 'lisp/gnus/rfc2047.el')
-rw-r--r--lisp/gnus/rfc2047.el36
1 files changed, 19 insertions, 17 deletions
diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el
index cda7979252f..40b10c07eb4 100644
--- a/lisp/gnus/rfc2047.el
+++ b/lisp/gnus/rfc2047.el
@@ -178,30 +178,32 @@ Quoting will not be done in a quoted string if it contains characters
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)))
- (goto-char beg)
- (unless (and encodable-regexp
- (re-search-forward encodable-regexp nil t))
+ (setq end (1- (point)))
+ (goto-char beg)
+ (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))))))))