Show
Ignore:
Timestamp:
09/18/06 20:48:14 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/gnus/rfc2047.el

    r4161 r4166  
    179179  (goto-char (point-min)) 
    180180  (let ((tspecials (concat "[" ietf-drums-tspecials "]")) 
    181         beg
     181        beg end
    182182    (with-syntax-table (standard-syntax-table) 
    183183      (while (search-forward "\"" nil t) 
    184         (unless (eq (char-before) ?\\) 
    185           (setq beg (match-end 0)) 
    186           (goto-char (match-beginning 0)) 
     184        (setq beg (match-beginning 0)) 
     185        (unless (eq (char-before beg) ?\\) 
     186          (goto-char beg) 
     187          (setq beg (1+ beg)) 
    187188          (condition-case nil 
    188189              (progn 
    189190                (forward-sexp) 
    190                 (save-restriction 
    191                   (narrow-to-region beg (1- (point))) 
    192                   (goto-char beg) 
    193                   (unless (and encodable-regexp 
    194                                (re-search-forward encodable-regexp nil t)) 
     191                (setq end (1- (point))) 
     192                (goto-char beg) 
     193                (if (and encodable-regexp 
     194                         (re-search-forward encodable-regexp end t)) 
     195                    (goto-char (1+ end)) 
     196                  (save-restriction 
     197                    (narrow-to-region beg end) 
    195198                    (while (re-search-forward tspecials nil 'move) 
    196                       (unless (and (eq (char-before) ?\\) ;; Already quoted. 
    197                                    (looking-at tspecials)) 
     199                      (if (eq (char-before) ?\\) 
     200                          (if (looking-at tspecials) ;; Already quoted. 
     201                              (forward-char) 
     202                            (insert "\\")) 
    198203                        (goto-char (match-beginning 0)) 
    199                         (unless (or (eq (char-before) ?\\) 
    200                                     (and rfc2047-encode-encoded-words 
    201                                          (eq (char-after) ??) 
    202                                          (eq (char-before) ?=))) 
    203                           (insert "\\"))) 
    204                       (forward-char))))) 
     204                        (insert "\\") 
     205                        (forward-char)))) 
     206                  (forward-char))) 
    205207            (error 
    206208             (goto-char beg))))))))