(subst-char-in-region (point-min) (point-max) ?\t ? t)
(gnus-run-hooks 'gnus-parse-headers-hook)
(let ((case-fold-search t)
- in-reply-to header p lines)
+ in-reply-to header p lines
+ rawtext decoded)
(goto-char (point-min))
;; Search to the beginning of the next header. Error messages
;; do not begin with 2 or 3.
(progn
(goto-char p)
(if (search-forward "\nsubject: " nil t)
- (funcall
- gnus-unstructured-field-decoder (nnheader-header-value))
+ (progn
+ (setq rawtext (nnheader-header-value)
+ decoded (funcall
+ gnus-unstructured-field-decoder rawtext))
+ (if (string-equal rawtext decoded)
+ rawtext
+ (put-text-property 0 (length decoded) 'raw-text rawtext decoded)
+ decoded))
"(none)"))
;; From.
(progn
(goto-char p)
(if (search-forward "\nfrom: " nil t)
- (funcall
- gnus-structured-field-decoder (nnheader-header-value))
+ (progn
+ (setq rawtext (nnheader-header-value)
+ decoded (funcall
+ gnus-structured-field-decoder rawtext))
+ (if (string-equal rawtext decoded)
+ rawtext
+ (put-text-property 0 (length decoded) 'raw-text rawtext decoded)
+ decoded))
"(nobody)"))
;; Date.
(progn
(defun gnus-nov-parse-line (number dependencies &optional force-new)
(let ((eol (gnus-point-at-eol))
(buffer (current-buffer))
- header ref id id-dep ref-dep)
+ header ref id id-dep ref-dep
+ rawtext decoded)
;; overview: [num subject from date id refs chars lines misc]
(unwind-protect
(setq header
(vector
number ; number
- (funcall
- gnus-unstructured-field-decoder (gnus-nov-field)) ; subject
- (funcall
- gnus-structured-field-decoder (gnus-nov-field)) ; from
+ (progn
+ (setq rawtext (gnus-nov-field) ; subject
+ decoded (funcall
+ gnus-unstructured-field-decoder rawtext))
+ (if (string-equal rawtext decoded)
+ rawtext
+ (put-text-property 0 (length decoded) 'raw-text rawtext decoded)
+ decoded))
+ (progn
+ (setq rawtext (gnus-nov-field) ; from
+ decoded (funcall
+ gnus-structured-field-decoder rawtext))
+ (if (string-equal rawtext decoded)
+ rawtext
+ (put-text-property 0 (length decoded) 'raw-text rawtext decoded)
+ decoded))
(gnus-nov-field) ; date
(setq id (or (gnus-nov-field)
(nnheader-generate-fake-message-id))) ; id