X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fnnmail.el;h=8e8fbfc6222a01f9ce5c3a0c3903a8fd363615b9;hb=d48c014e9def24a6c0de92967e489c06923343c0;hp=5b9dd8f1d1043aa7b0e5440a6065a41a2ee3ccd6;hpb=d628d4fe4f9f36072c722eca27c36025b9f13b51;p=elisp%2Fgnus.git- diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 5b9dd8f..8e8fbfc 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -241,6 +241,13 @@ to be moved to." :group 'nnmail-retrieve :type 'string) +(defcustom nnmail-movemail-args nil + "*Extra arguments to give to `nnmail-movemail-program' to move mail from the inbox. +The default is nil" + :group 'nnmail-files + :group 'nnmail-retrieve + :type 'string) + (defcustom nnmail-pop-password-required nil "*Non-nil if a password is required when reading mail using POP." :group 'nnmail-retrieve @@ -442,6 +449,11 @@ parameter. It should return nil, `warn' or `delete'." (const warn) (const delete))) +(defcustom nnmail-extra-headers nil + "*Extra headers to parse." + :group 'nnmail + :type '(repeat symbol)) + ;;; Internal variables. (defvar nnmail-split-history nil @@ -487,11 +499,12 @@ parameter. It should return nil, `warn' or `delete'." (defun nnmail-find-file (file) "Insert FILE in server buffer safely." (set-buffer nntp-server-buffer) - (erase-buffer) + (delete-region (point-min) (point-max)) (let ((format-alist nil) (after-insert-file-functions nil)) (condition-case () (let ((coding-system-for-read nnmail-file-coding-system) + (auto-mode-alist (nnheader-auto-mode-alist)) (pathname-coding-system nnmail-file-coding-system)) (insert-file-contents file) t) @@ -596,7 +609,9 @@ parameter. It should return nil, `warn' or `delete'." nnmail-movemail-program exec-directory) nil errors nil inbox tofile) (when nnmail-internal-password - (list nnmail-internal-password))))))) + (list nnmail-internal-password)) + (when nnmail-movemail-args + nnmail-movemail-args)))))) (push inbox nnmail-moved-inboxes) (if (and (not (buffer-modified-p errors)) (zerop result)) @@ -793,7 +808,7 @@ is a spool. If not using procmail, return GROUP." (when (and (or (bobp) (save-excursion (forward-line -1) - (= (following-char) ?\n))) + (eq (char-after) ?\n))) (save-excursion (forward-line 1) (while (looking-at ">From \\|From ") @@ -822,7 +837,7 @@ is a spool. If not using procmail, return GROUP." (when (and (or (bobp) (save-excursion (forward-line -1) - (= (following-char) ?\n))) + (eq (char-after) ?\n))) (save-excursion (forward-line 1) (while (looking-at ">From \\|From ") @@ -986,7 +1001,6 @@ FUNC will be called with the buffer narrowed to each mail." (save-excursion ;; Insert the incoming file. (set-buffer (get-buffer-create " *nnmail incoming*")) - (buffer-disable-undo (current-buffer)) (erase-buffer) (nnheader-insert-file-contents incoming) (unless (zerop (buffer-size)) @@ -1095,8 +1109,7 @@ FUNC will be called with the group name to determine the article number." ;; group twice. (not (assoc (car method) group-art))) (push (cons (if regrepp - (replace-match - (car method) nil nil (car method)) + (nnmail-expand-newtext (car method)) (car method)) (funcall func (car method))) group-art)) @@ -1441,7 +1454,6 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (set-buffer (setq nnmail-cache-buffer (get-buffer-create " *nnmail message-id cache*"))) - (buffer-disable-undo (current-buffer)) (when (file-exists-p nnmail-message-id-cache-file) (nnheader-insert-file-contents nnmail-message-id-cache-file)) (set-buffer-modified-p nil) @@ -1509,9 +1521,9 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." ;; Let the backend save the article (or not). (cond ((not duplication) - (nnmail-cache-insert message-id) (funcall func (setq group-art - (nreverse (nnmail-article-group artnum-func))))) + (nreverse (nnmail-article-group artnum-func)))) + (nnmail-cache-insert message-id)) ((eq action 'delete) (setq group-art nil)) ((eq action 'warn) @@ -1695,11 +1707,11 @@ If ARGS, PROMPT is used as an argument to `format'." (goto-char (point-min)) (while (re-search-forward "[^ \t=]+" nil t) (setq name (match-string 0)) - (if (not (= (following-char) ?=)) + (if (not (eq (char-after) ?=)) ;; Implied "yes". (setq value "yes") (forward-char 1) - (if (not (= (following-char) ?\")) + (if (not (eq (char-after) ?\")) (if (not (looking-at "[^ \t]")) ;; Implied "no". (setq value "no")