diff options
author | Miles Bader <miles@gnu.org> | 2006-09-14 09:24:00 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2006-09-14 09:24:00 +0000 |
commit | 863153c57b164f79f030f34dba6953a3d0d60097 (patch) | |
tree | 85c2823f2a948b0d8757b6787cb059793581339a /lisp/gnus/rfc2047.el | |
parent | fae22cbf7f66b7adc732e46a27b821114c812fdd (diff) | |
parent | f9536fb238209311e10468e4eb0fa2ac0a309816 (diff) | |
download | emacs-863153c57b164f79f030f34dba6953a3d0d60097.tar.gz emacs-863153c57b164f79f030f34dba6953a3d0d60097.tar.bz2 emacs-863153c57b164f79f030f34dba6953a3d0d60097.zip |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 427-436)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 134-136)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-110
Diffstat (limited to 'lisp/gnus/rfc2047.el')
-rw-r--r-- | lisp/gnus/rfc2047.el | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el index 534459683ce..40e7c96246b 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)))))))) |