:group 'nnmail
:type '(repeat symbol))
+(defcustom nnmail-split-header-length-limit 1024
+ "Header lines longer than this limit are excluded from the split function."
+ :group 'nnmail
+ :type 'integer)
+
;;; Internal variables.
(defvar nnmail-split-history nil
(defvar nnmail-file-coding-system 'binary
"Coding system used in nnmail.")
+(defvar nnmail-file-coding-system-1
+ (if (string-match "nt" system-configuration)
+ 'raw-text-dos 'binary)
+ "Another coding system used in nnmail.")
+
+(defvar nnmail-incoming-coding-system
+ mm-text-coding-system
+ "Coding system used in reading inbox")
+
(defun nnmail-find-file (file)
"Insert FILE in server buffer safely."
(set-buffer nntp-server-buffer)
;; Insert the incoming file.
(set-buffer (get-buffer-create " *nnmail incoming*"))
(erase-buffer)
- (nnheader-insert-file-contents incoming)
+ (let ((nnheader-file-coding-system nnmail-incoming-coding-system))
+ (nnheader-insert-file-contents incoming))
(unless (zerop (buffer-size))
(goto-char (point-min))
(save-excursion (run-hooks 'nnmail-prepare-incoming-hook))
(goto-char (point-min))
(while (not (eobp))
(end-of-line)
- (if (> (current-column) 1024)
- (gnus-delete-line)
+ (if (> (current-column) nnmail-split-header-length-limit)
+ (delete-region (point) (progn (end-of-line) (point)))
(forward-line 1)))
;; Allow washing.
(goto-char (point-min))