From: yamaoka Date: Thu, 16 Oct 2003 22:25:15 +0000 (+0000) Subject: Synch to Gnus 200310162216. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e76b15493bb3f02270b1950187bcc346ac935778;p=elisp%2Fgnus.git- Synch to Gnus 200310162216. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e555fb6..1eb7b97 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,30 @@ 2003-10-16 Katsumi Yamaoka + * mail-source.el (mail-source-fetch-imap): Fix mismatched parens. + +2003-10-16 Lars Magne Ingebrigtsen + + * mail-source.el (defvar): Add post/pre/scripts. + (mail-source-fetch-imap): Use them. + + * nndraft.el (nndraft-request-move-article): Fix infinite + recursion. + + * gnus-group.el (gnus-group-mark-regexp): Jump to groups. + +2003-10-16 Ed L. Cashin + + * imap.el (imap-interactive-login): Set imap-password to nil if + login fails. + +2003-10-16 Lars Magne Ingebrigtsen + + * message.el (message-inserted-headers): New variable. + (message-mode): Make local. + (message-mode): Set all the local action variables to nil. + +2003-10-16 Katsumi Yamaoka + * mm-decode.el (mm-inline-text-html-with-images): Doc fix. (mm-w3m-safe-url-regexp): Doc fix. diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 2aaed98..6cc58cb 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -1776,9 +1776,11 @@ If UNMARK, remove the mark instead." (interactive "sMark (regexp): ") (let ((alist (cdr gnus-newsrc-alist)) group) - (while alist - (when (string-match regexp (setq group (gnus-info-group (pop alist)))) - (gnus-group-set-mark group)))) + (save-excursion + (while alist + (when (string-match regexp (setq group (gnus-info-group (pop alist)))) + (gnus-group-jump-to-group group) + (gnus-group-set-mark group))))) (gnus-group-position-point)) (defun gnus-group-remove-mark (group &optional test-marked) diff --git a/lisp/imap.el b/lisp/imap.el index 08983a0..7b8316b 100644 --- a/lisp/imap.el +++ b/lisp/imap.el @@ -803,6 +803,7 @@ Returns t if login was successful, nil otherwise." (setq imap-password passwd))) (message "Login failed...") (setq passwd nil) + (setq imap-password nil) (sit-for 1)))) ;; (quit (with-current-buffer buffer ;; (setq user nil diff --git a/lisp/mail-source.el b/lisp/mail-source.el index 0574473..de0a785 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -358,6 +358,9 @@ Common keywords should be listed here.") (:mailbox "INBOX") (:predicate "UNSEEN UNDELETED") (:fetchflag "\\Deleted") + (:prescript) + (:prescript-delay) + (:postscript) (:dontexpunge)) (webmail (:subtype hotmail) @@ -977,6 +980,10 @@ This only works when `display-time' is enabled." (defun mail-source-fetch-imap (source callback) "Fetcher for imap sources." (mail-source-bind (imap source) + (mail-source-run-script + prescript (format-spec-make ?p password ?t mail-source-crash-box + ?s server ?P port ?u user) + prescript-delay) (let ((from (format "%s:%s:%s" server user port)) (found 0) (buf (generate-new-buffer " *imap source*")) @@ -1033,6 +1040,10 @@ This only works when `display-time' is enabled." mail-source-password-cache)) (error "IMAP error: %s" (imap-error-text buf))) (kill-buffer buf) + (mail-source-run-script + postscript + (format-spec-make ?p password ?t mail-source-crash-box + ?s server ?P port ?u user)) found))) (eval-and-compile diff --git a/lisp/message.el b/lisp/message.el index b5525b9..fdbe633 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1553,6 +1553,7 @@ no, only reply back to the author." (defvar message-draft-article nil) (defvar message-mime-part nil) (defvar message-posting-charset nil) +(defvar message-inserted-headers nil) ;; Byte-compiler warning (eval-when-compile @@ -2564,11 +2565,12 @@ C-c M-f `message-mark-insert-file' (insert file marked with enclosing tags). M-RET `message-newline-and-reformat' (break the line and reformat)." (setq local-abbrev-table text-mode-abbrev-table) (set (make-local-variable 'message-reply-buffer) nil) - (make-local-variable 'message-send-actions) - (make-local-variable 'message-exit-actions) - (make-local-variable 'message-kill-actions) - (make-local-variable 'message-postpone-actions) - (make-local-variable 'message-draft-article) + (set (make-local-variable 'message-inserted-headers) nil) + (set (make-local-variable 'message-send-actions) nil) + (set (make-local-variable 'message-exit-actions) nil) + (set (make-local-variable 'message-kill-actions) nil) + (set (make-local-variable 'message-postpone-actions) nil) + (set (make-local-variable 'message-draft-article) nil) (setq buffer-offer-save t) (set (make-local-variable 'facemenu-add-face-function) (lambda (face end) @@ -5439,7 +5441,7 @@ Headers already prepared in the buffer are not modified." (Expires (message-make-expires)) (case-fold-search t) (optionalp nil) - header value elem) + header value elem header-string) ;; First we remove any old generated headers. (let ((headers message-deletable-headers)) (unless (buffer-modified-p) @@ -5464,13 +5466,12 @@ Headers already prepared in the buffer are not modified." optionalp t) (setq header (car elem))) (setq header elem)) + (setq header-string (if (stringp header) + header + (symbol-name header))) (when (or (not (re-search-forward (concat "^" - (regexp-quote - (downcase - (if (stringp header) - header - (symbol-name header)))) + (regexp-quote (downcase header-string)) ":") nil t)) (progn @@ -5483,7 +5484,8 @@ Headers already prepared in the buffer are not modified." (setq value (cond ((and (consp elem) - (eq (car elem) 'optional)) + (eq (car elem) 'optional) + (not (member header-string message-inserted-headers))) ;; This is an optional header. If the cdr of this ;; is something that is nil, then we do not insert ;; this header. @@ -5523,9 +5525,7 @@ Headers already prepared in the buffer are not modified." (cdr (assq header message-header-format-alist)))) (if formatter (funcall formatter header value) - (insert (if (stringp header) - header (symbol-name header)) - ": " value)) + (insert header-string ": " value)) ;; We check whether the value was ended by a ;; newline. If now, we insert one. (unless (bolp) @@ -5537,6 +5537,7 @@ Headers already prepared in the buffer are not modified." ;; If the header is optional, and the header was ;; empty, we can't insert it anyway. (unless optionalp + (push header-string message-inserted-headers) (insert value) (when (bolp) (delete-char -1)))) diff --git a/lisp/nndraft.el b/lisp/nndraft.el index bd27cfe..8e1be61 100644 --- a/lisp/nndraft.el +++ b/lisp/nndraft.el @@ -200,7 +200,7 @@ accept-form &optional last) (nndraft-possibly-change-group group) (let ((nnmh-allow-delete-final t)) - (nnoo-parent-function 'nndraft 'nndraft-request-move-article + (nnoo-parent-function 'nndraft 'nnmh-request-move-article (list article group server accept-form last)))) (deffoo nndraft-request-expire-articles (articles group &optional server force)