2003-10-16 Katsumi Yamaoka <yamaoka@jpl.org>
+ * mail-source.el (mail-source-fetch-imap): Fix mismatched parens.
+
+2003-10-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * 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 <ecashin@uga.edu>
+
+ * imap.el (imap-interactive-login): Set imap-password to nil if
+ login fails.
+
+2003-10-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * 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 <yamaoka@jpl.org>
+
* mm-decode.el (mm-inline-text-html-with-images): Doc fix.
(mm-w3m-safe-url-regexp): Doc fix.
(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)
(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
(:mailbox "INBOX")
(:predicate "UNSEEN UNDELETED")
(:fetchflag "\\Deleted")
+ (:prescript)
+ (:prescript-delay)
+ (:postscript)
(:dontexpunge))
(webmail
(:subtype hotmail)
(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*"))
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
(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
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)
(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)
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
(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.
(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)
;; 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))))
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)