From: morioka Date: Thu, 27 Nov 1997 18:05:56 +0000 (+0000) Subject: sync with qgnus-0.17. X-Git-Tag: gnus-6_7-tomo-199811302358~285 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3e16dd00e23c5830dfcc8c700ae446098db1702e;p=elisp%2Fgnus.git- sync with qgnus-0.17. --- diff --git a/lisp/message.el b/lisp/message.el index 8624a99..2aaf2cf 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -33,9 +33,6 @@ (eval-when-compile (require 'cl)) (require 'mailheader) -(condition-case nil - (require 'rmail) - (t (message "Ignore any errors about rmail from this file"))) (require 'nnheader) (require 'timezone) (require 'easymenu) @@ -551,6 +548,7 @@ If stringp, use this; if non-nil, use no host name (user name only)." (define-widget 'message-header-lines 'text "All header lines must be LFD terminated." :valid-regexp "^\\'" + :format "%t:\n%v" :error "All header lines must be newline terminated") (defcustom message-default-headers "" @@ -786,6 +784,8 @@ Defaults to `text-mode-abbrev-table'.") (0 'message-cited-text-face)))) "Additional expressions to highlight in Message mode.") +(put 'message-mode 'font-lock-defaults '(message-font-lock-keywords t)) + (defvar message-face-alist '((bold . bold-region) (underline . underline-region) @@ -1271,8 +1271,6 @@ C-c C-r message-caesar-buffer-body (rot13 the message body)." (setq major-mode 'message-mode) (setq mode-name "Message") (setq buffer-offer-save t) - (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '(message-font-lock-keywords t)) (make-local-variable 'facemenu-add-face-function) (make-local-variable 'facemenu-remove-face-function) (setq facemenu-add-face-function diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 366a5ed..5b7da45 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -214,8 +214,9 @@ on your system, you could say something like: (goto-char p) (if (search-forward "\nmessage-id:" nil t) (buffer-substring - (1- (or (search-forward "<" nil t) (point))) - (or (search-forward ">" nil t) (point))) + (1- (or (search-forward "<" (gnus-point-at-eol) t) + (point))) + (or (search-forward ">" (gnus-point-at-eol) t) (point))) ;; If there was no message-id, we just fake one to make ;; subsequent routines simpler. (nnheader-generate-fake-message-id))) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 0ab418f..1026dae 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -445,6 +445,8 @@ parameter. It should return nil, `warn' or `delete'." (defvar nnmail-split-history nil "List of group/article elements that say where the previous split put messages.") +(defvar nnmail-current-spool nil) + (defvar nnmail-pop-password nil "*Password to use when reading mail from a POP server, if required.") @@ -616,17 +618,17 @@ parameter. It should return nil, `warn' or `delete'." (save-excursion (setq errors (generate-new-buffer " *nnmail loss*")) (buffer-disable-undo errors) - (let ((default-directory "/")) - (if (nnheader-functionp nnmail-movemail-program) - (condition-case err - (progn - (funcall nnmail-movemail-program inbox tofile) - (setq result 0)) - (error - (save-excursion - (set-buffer errors) - (insert (prin1-to-string err)) - (setq result 255)))) + (if (nnheader-functionp nnmail-movemail-program) + (condition-case err + (progn + (funcall nnmail-movemail-program inbox tofile) + (setq result 0)) + (error + (save-excursion + (set-buffer errors) + (insert (prin1-to-string err)) + (setq result 255)))) + (let ((default-directory "/")) (setq result (apply 'call-process @@ -877,7 +879,7 @@ is a spool. If not using procmail, return GROUP." (goto-char (match-beginning 0)))) ;; Possibly wrong format? (progn - (pop-to-buffer (current-buffer)) + (pop-to-buffer (find-file-noselect nnmail-current-spool)) (error "Error, unknown mail format! (Possibly corrupted.)")) ;; Carry on until the bitter end. (while (not (eobp)) @@ -964,7 +966,7 @@ is a spool. If not using procmail, return GROUP." (forward-line 1))) ;; Possibly wrong format? (progn - (pop-to-buffer (current-buffer)) + (pop-to-buffer (find-file-noselect nnmail-current-spool)) (error "Error, unknown mail format! (Possibly corrupted.)")) ;; Carry on until the bitter end. (while (not (eobp)) @@ -1550,7 +1552,7 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (setq nnmail-split-history nil)) (let* ((spools (nnmail-get-spool-files group)) (group-in group) - incoming incomings spool) + nnmail-current-spool incoming incomings spool) (when (and (nnmail-get-value "%s-get-new-mail" method) nnmail-spool-file) ;; We first activate all the groups. @@ -1572,6 +1574,7 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (nnheader-message 3 "%s: Reading incoming mail..." method) (when (and (nnmail-move-inbox spool) (file-exists-p nnmail-crash-box)) + (setq nnmail-current-spool spool) ;; There is new mail. We first find out if all this mail ;; is supposed to go to some specific group. (setq group (nnmail-get-split-group spool group-in))