aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/gnus/mail-source.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/mail-source.el')
-rw-r--r--lisp/gnus/mail-source.el34
1 files changed, 15 insertions, 19 deletions
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index 212657aec26..4f02d86f441 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -380,13 +380,10 @@ All keywords that can be used must be listed here."))
380;; suitable for usage in a `let' form 380;; suitable for usage in a `let' form
381(eval-and-compile 381(eval-and-compile
382 (defun mail-source-bind-1 (type) 382 (defun mail-source-bind-1 (type)
383 (let* ((defaults (cdr (assq type mail-source-keyword-map))) 383 (mapcar (lambda (default)
384 default bind) 384 (list (mail-source-strip-keyword (car default))
385 (while (setq default (pop defaults)) 385 nil))
386 (push (list (mail-source-strip-keyword (car default)) 386 (cdr (assq type mail-source-keyword-map)))))
387 nil)
388 bind))
389 bind)))
390 387
391(defmacro mail-source-bind (type-source &rest body) 388(defmacro mail-source-bind (type-source &rest body)
392 "Return a `let' form that binds all variables in source TYPE. 389 "Return a `let' form that binds all variables in source TYPE.
@@ -476,20 +473,16 @@ the `mail-source-keyword-map' variable."
476 473
477(eval-and-compile 474(eval-and-compile
478 (defun mail-source-bind-common-1 () 475 (defun mail-source-bind-common-1 ()
479 (let* ((defaults mail-source-common-keyword-map) 476 (mapcar (lambda (default)
480 default bind) 477 (list (mail-source-strip-keyword (car default))
481 (while (setq default (pop defaults)) 478 nil))
482 (push (list (mail-source-strip-keyword (car default)) 479 mail-source-common-keyword-map)))
483 nil)
484 bind))
485 bind)))
486 480
487(defun mail-source-set-common-1 (source) 481(defun mail-source-set-common-1 (source)
488 (let* ((type (pop source)) 482 (let* ((type (pop source))
489 (defaults mail-source-common-keyword-map)
490 (defaults-1 (cdr (assq type mail-source-keyword-map))) 483 (defaults-1 (cdr (assq type mail-source-keyword-map)))
491 default value keyword) 484 value keyword)
492 (while (setq default (pop defaults)) 485 (dolist (default mail-source-common-keyword-map)
493 (set (mail-source-strip-keyword (setq keyword (car default))) 486 (set (mail-source-strip-keyword (setq keyword (car default)))
494 (if (setq value (plist-get source keyword)) 487 (if (setq value (plist-get source keyword))
495 (mail-source-value value) 488 (mail-source-value value)
@@ -919,7 +912,7 @@ authentication. To do that, you need to set the
919`message-send-mail-function' variable as `message-smtpmail-send-it' 912`message-send-mail-function' variable as `message-smtpmail-send-it'
920and put the following line in your ~/.gnus.el file: 913and put the following line in your ~/.gnus.el file:
921 914
922\(add-hook \\='message-send-mail-hook \\='mail-source-touch-pop) 915\(add-hook \\='message-send-mail-hook #\\='mail-source-touch-pop)
923 916
924See the Gnus manual for details." 917See the Gnus manual for details."
925 (let ((sources (if mail-source-primary-source 918 (let ((sources (if mail-source-primary-source
@@ -963,6 +956,8 @@ See the Gnus manual for details."
963 ;; (element 0 of the vector is nil if the timer is active). 956 ;; (element 0 of the vector is nil if the timer is active).
964 (aset mail-source-report-new-mail-idle-timer 0 nil))) 957 (aset mail-source-report-new-mail-idle-timer 0 nil)))
965 958
959(declare-function display-time-event-handler "time" ())
960
966(defun mail-source-report-new-mail (arg) 961(defun mail-source-report-new-mail (arg)
967 "Toggle whether to report when new mail is available. 962 "Toggle whether to report when new mail is available.
968This only works when `display-time' is enabled." 963This only works when `display-time' is enabled."
@@ -1075,7 +1070,8 @@ This only works when `display-time' is enabled."
1075 (if (and (imap-open server port stream authentication buf) 1070 (if (and (imap-open server port stream authentication buf)
1076 (imap-authenticate 1071 (imap-authenticate
1077 user (or (cdr (assoc from mail-source-password-cache)) 1072 user (or (cdr (assoc from mail-source-password-cache))
1078 password) buf)) 1073 password)
1074 buf))
1079 (let ((mailbox-list (if (listp mailbox) mailbox (list mailbox)))) 1075 (let ((mailbox-list (if (listp mailbox) mailbox (list mailbox))))
1080 (dolist (mailbox mailbox-list) 1076 (dolist (mailbox mailbox-list)
1081 (when (imap-mailbox-select mailbox nil buf) 1077 (when (imap-mailbox-select mailbox nil buf)