%l with the value of `imap-default-user'. The program should accept
IMAP commands on stdin and return responses to stdout. Each entry in
the list is tried until a successful connection is made."
- :group 'imap
:type '(repeat string))
(defcustom imap-gssapi-program (list
%l with the value of `imap-default-user'. The program should accept
IMAP commands on stdin and return responses to stdout. Each entry in
the list is tried until a successful connection is made."
- :group 'imap
:type '(repeat string))
(defcustom imap-shell-program '("ssh %s imapd"
`imap-default-user'. The program should read IMAP commands from stdin
and write IMAP response to stdout. Each entry in the list is tried
until a successful connection is made."
- :group 'imap
:type '(repeat string))
(defcustom imap-process-connection-type nil
in any case. The value takes effect when an IMAP server is
opened; changing it after that has no effect."
:version "22.1"
- :group 'imap
:type 'boolean)
(defcustom imap-use-utf7 t
Since the UTF7 decoding currently only decodes into ISO-8859-1
characters, you may disable this decoding if you need to access UTF7
encoded mailboxes which doesn't translate into ISO-8859-1."
- :group 'imap
:type 'boolean)
(defcustom imap-log nil
variable unless you are comfortable with that.
See also `imap-debug'."
- :group 'imap
:type 'boolean)
(defcustom imap-debug nil
This variable only takes effect when loading the `imap' library.
See also `imap-log'."
- :group 'imap
:type 'boolean)
(defcustom imap-shell-host "gateway"
"Hostname of rlogin proxy."
- :group 'imap
:type 'string)
(defcustom imap-default-user (user-login-name)
"Default username to use."
- :group 'imap
:type 'string)
(defcustom imap-read-timeout (if (memq system-type '(windows-nt cygwin))
0.1)
"How long to wait between checking for the end of output.
Shorter values mean quicker response, but is more CPU intensive."
- :type 'number
- :group 'imap)
+ :type 'number)
(defcustom imap-store-password nil
"If non-nil, store session password without prompting."
- :group 'imap
:type 'boolean)
;;; Various variables
"imap" buffer imap-server imap-port)
((error quit) nil)))
(when imap-process
- (set-process-filter imap-process 'imap-arrival-filter)
- (set-process-sentinel imap-process 'imap-sentinel)
+ (set-process-filter imap-process #'imap-arrival-filter)
+ (set-process-sentinel imap-process #'imap-sentinel)
(while (and (eq imap-state 'initial)
(memq (process-status imap-process) '(open run)))
(message "Waiting for response from %s..." imap-server)
(with-current-buffer (get-buffer-create buffer)
(if (imap-opened buffer)
(imap-close buffer))
- (mapc 'make-local-variable imap-local-variables)
+ (mapc #'make-local-variable imap-local-variables)
(set-buffer-multibyte nil)
(buffer-disable-undo)
(setq imap-server (or server imap-server))
;; Stream changed?
(if (not (eq imap-default-stream stream))
(with-current-buffer (generate-new-buffer " *temp*")
- (mapc 'make-local-variable imap-local-variables)
+ (mapc #'make-local-variable imap-local-variables)
(set-buffer-multibyte nil)
(buffer-disable-undo)
(setq imap-server (or server imap-server))
"If non-nil, check if IMAP is open.
See the function `imap-ping-server'."
:version "23.1" ;; No Gnus
- :group 'imap
:type 'boolean)
(defun imap-opened (&optional buffer)
(when imap-current-mailbox
(if asynch
(imap-add-callback (imap-send-command "CLOSE")
- `(lambda (tag status)
- (message "IMAP mailbox `%s' closed... %s"
- imap-current-mailbox status)
- (when (eq ,imap-current-mailbox
- imap-current-mailbox)
- ;; Don't wipe out data if another mailbox
- ;; was selected...
- (setq imap-current-mailbox nil
- imap-message-data nil
- imap-state 'auth))))
+ (let ((cmb imap-current-mailbox))
+ (lambda (_tag status)
+ (message "IMAP mailbox `%s' closed... %s"
+ imap-current-mailbox status)
+ (when (eq cmb imap-current-mailbox)
+ ;; Don't wipe out data if another mailbox
+ ;; was selected...
+ (setq imap-current-mailbox nil
+ imap-message-data nil
+ imap-state 'auth)))))
(when (imap-ok-p (imap-send-command-wait "CLOSE"))
(setq imap-current-mailbox nil
imap-message-data nil
(prog1
(and (imap-fetch-safe '("*" . "*:*") "UID")
(list (imap-mailbox-get-1 'uidvalidity mailbox)
- (apply 'max (imap-message-map
- (lambda (uid _prop) uid) 'UID))))
+ (apply #'max (imap-message-map
+ (lambda (uid _prop) uid) 'UID))))
(if old-mailbox
(imap-mailbox-select old-mailbox (eq state 'examine))
(imap-mailbox-unselect)))))))
(prog1
(and (imap-fetch-safe '("*" . "*:*") "UID")
(list (imap-mailbox-get-1 'uidvalidity mailbox)
- (apply 'max (imap-message-map
+ (apply #'max (imap-message-map
(lambda (uid _prop) uid) 'UID))))
(if old-mailbox
(imap-mailbox-select old-mailbox (eq state 'examine))
(numberp (nth 9 body)))
(nth 9 body))
(t 0))
- (apply '+ (mapcar 'imap-body-lines body)))
+ (apply #'+ (mapcar #'imap-body-lines body)))
0))
(defun imap-envelope-from (from)
(buffer-substring (point) (1- (re-search-forward "[] ]" nil t)))))
(if (eq (char-before) ? )
(prog1
- (mapconcat 'identity (cons section (imap-parse-header-list)) " ")
+ (mapconcat #'identity (cons section (imap-parse-header-list)) " ")
(search-forward "]" nil t))
section)))