mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-07 06:22:32 -08:00
nnimap.el (nnimap-debug): Removed; imap.el: Remove an optional buffer parameter from many functions.
This commit is contained in:
parent
3733ba53bb
commit
f292afe545
4 changed files with 54 additions and 110 deletions
|
|
@ -1,3 +1,13 @@
|
|||
2010-09-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* net/imap.el (imap-message-map): Removed optional buffer parameter,
|
||||
since no callers use it.
|
||||
(imap-message-get): Ditto.
|
||||
(imap-message-put): Ditto.
|
||||
(imap-mailbox-map): Ditto.
|
||||
(imap-mailbox-put): Ditto.
|
||||
(imap-mailbox-get): Ditto.
|
||||
|
||||
2010-09-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* net/imap.el (imap-fetch-safe): Removed function, and altered all
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
* nnimap.el (nnimap-request-list): Servers may return \NoSelect
|
||||
case-insensitively.
|
||||
(nnimap-debug): Removed.
|
||||
|
||||
* mail-source.el (mail-source-fetch): Don't message if we're fetching
|
||||
mail from a file, and the file doesn't exist.
|
||||
|
|
|
|||
|
|
@ -589,10 +589,11 @@ If EXAMINE is non-nil the group is selected read-only."
|
|||
(let (minuid maxuid)
|
||||
(when (> (imap-mailbox-get 'exists) 0)
|
||||
(imap-fetch "1:*" "UID" nil 'nouidfetch)
|
||||
(imap-message-map (lambda (uid Uid)
|
||||
(setq minuid (if minuid (min minuid uid) uid)
|
||||
maxuid (if maxuid (max maxuid uid) uid)))
|
||||
'UID))
|
||||
(imap-message-map
|
||||
(lambda (uid Uid)
|
||||
(setq minuid (if minuid (min minuid uid) uid)
|
||||
maxuid (if maxuid (max maxuid uid) uid)))
|
||||
'UID))
|
||||
(list (imap-mailbox-get 'exists) minuid maxuid))))))
|
||||
|
||||
(defun nnimap-possibly-change-group (group &optional server)
|
||||
|
|
@ -1813,68 +1814,6 @@ be used in a STORE FLAGS command."
|
|||
"Return t if MARK can be permanently (between IMAP sessions) saved on articles, in GROUP."
|
||||
(imap-message-flag-permanent-p (nnimap-mark-to-flag mark)))
|
||||
|
||||
(when nnimap-debug
|
||||
(require 'trace)
|
||||
(buffer-disable-undo (get-buffer-create nnimap-debug-buffer))
|
||||
(mapc (lambda (f) (trace-function-background f nnimap-debug-buffer))
|
||||
'(
|
||||
nnimap-possibly-change-server
|
||||
nnimap-verify-uidvalidity
|
||||
nnimap-find-minmax-uid
|
||||
nnimap-before-find-minmax-bugworkaround
|
||||
nnimap-possibly-change-group
|
||||
;;nnimap-replace-whitespace
|
||||
nnimap-retrieve-headers-progress
|
||||
nnimap-retrieve-which-headers
|
||||
nnimap-group-overview-filename
|
||||
nnimap-retrieve-headers-from-file
|
||||
nnimap-retrieve-headers-from-server
|
||||
nnimap-retrieve-headers
|
||||
nnimap-open-connection
|
||||
nnimap-open-server
|
||||
nnimap-server-opened
|
||||
nnimap-close-server
|
||||
nnimap-request-close
|
||||
nnimap-status-message
|
||||
;;nnimap-demule
|
||||
nnimap-request-article-part
|
||||
nnimap-request-article
|
||||
nnimap-request-head
|
||||
nnimap-request-body
|
||||
nnimap-request-group
|
||||
nnimap-close-group
|
||||
nnimap-pattern-to-list-arguments
|
||||
nnimap-request-list
|
||||
nnimap-request-post
|
||||
nnimap-retrieve-groups
|
||||
nnimap-request-update-info-internal
|
||||
nnimap-request-type
|
||||
nnimap-request-set-mark
|
||||
nnimap-split-to-groups
|
||||
nnimap-split-find-rule
|
||||
nnimap-split-find-inbox
|
||||
nnimap-split-articles
|
||||
nnimap-request-scan
|
||||
nnimap-request-newgroups
|
||||
nnimap-request-create-group
|
||||
nnimap-time-substract
|
||||
nnimap-date-days-ago
|
||||
nnimap-request-expire-articles-progress
|
||||
nnimap-request-expire-articles
|
||||
nnimap-request-move-article
|
||||
nnimap-request-accept-article
|
||||
nnimap-request-delete-group
|
||||
nnimap-request-rename-group
|
||||
gnus-group-nnimap-expunge
|
||||
gnus-group-nnimap-edit-acl
|
||||
gnus-group-nnimap-edit-acl-done
|
||||
nnimap-group-mode-hook
|
||||
nnimap-mark-to-predicate
|
||||
nnimap-mark-to-flag-1
|
||||
nnimap-mark-to-flag
|
||||
nnimap-mark-permanent-p
|
||||
)))
|
||||
|
||||
(provide 'nnimap)
|
||||
|
||||
;;; nnimap.el ends here
|
||||
|
|
|
|||
|
|
@ -1303,40 +1303,37 @@ If BUFFER is nil, the current buffer is assumed."
|
|||
|
||||
;; Mailbox functions:
|
||||
|
||||
(defun imap-mailbox-put (propname value &optional mailbox buffer)
|
||||
(with-current-buffer (or buffer (current-buffer))
|
||||
(if imap-mailbox-data
|
||||
(put (intern (or mailbox imap-current-mailbox) imap-mailbox-data)
|
||||
propname value)
|
||||
(error "Imap-mailbox-data is nil, prop %s value %s mailbox %s buffer %s"
|
||||
propname value mailbox (current-buffer)))
|
||||
t))
|
||||
(defun imap-mailbox-put (propname value &optional mailbox)
|
||||
(if imap-mailbox-data
|
||||
(put (intern (or mailbox imap-current-mailbox) imap-mailbox-data)
|
||||
propname value)
|
||||
(error "Imap-mailbox-data is nil, prop %s value %s mailbox %s buffer %s"
|
||||
propname value mailbox (current-buffer)))
|
||||
t)
|
||||
|
||||
(defsubst imap-mailbox-get-1 (propname &optional mailbox)
|
||||
(get (intern-soft (or mailbox imap-current-mailbox) imap-mailbox-data)
|
||||
propname))
|
||||
|
||||
(defun imap-mailbox-get (propname &optional mailbox buffer)
|
||||
(let ((mailbox (imap-utf7-encode mailbox)))
|
||||
(with-current-buffer (or buffer (current-buffer))
|
||||
(imap-mailbox-get-1 propname (or mailbox imap-current-mailbox)))))
|
||||
(defun imap-mailbox-get (propname &optional mailbox)
|
||||
(imap-mailbox-get-1 propname (or (imap-utf7-encode mailbox)
|
||||
imap-current-mailbox)))
|
||||
|
||||
(defun imap-mailbox-map-1 (func &optional mailbox-decoder buffer)
|
||||
(with-current-buffer (or buffer (current-buffer))
|
||||
(let (result)
|
||||
(mapatoms
|
||||
(lambda (s)
|
||||
(push (funcall func (if mailbox-decoder
|
||||
(funcall mailbox-decoder (symbol-name s))
|
||||
(symbol-name s))) result))
|
||||
imap-mailbox-data)
|
||||
result)))
|
||||
(defun imap-mailbox-map-1 (func &optional mailbox-decoder)
|
||||
(let (result)
|
||||
(mapatoms
|
||||
(lambda (s)
|
||||
(push (funcall func (if mailbox-decoder
|
||||
(funcall mailbox-decoder (symbol-name s))
|
||||
(symbol-name s))) result))
|
||||
imap-mailbox-data)
|
||||
result))
|
||||
|
||||
(defun imap-mailbox-map (func &optional buffer)
|
||||
(defun imap-mailbox-map (func)
|
||||
"Map a function across each mailbox in `imap-mailbox-data', returning a list.
|
||||
Function should take a mailbox name (a string) as
|
||||
the only argument."
|
||||
(imap-mailbox-map-1 func 'imap-utf7-decode buffer))
|
||||
(imap-mailbox-map-1 func 'imap-utf7-decode))
|
||||
|
||||
(defun imap-current-mailbox (&optional buffer)
|
||||
(with-current-buffer (or buffer (current-buffer))
|
||||
|
|
@ -1650,29 +1647,26 @@ is non-nil return these properties."
|
|||
uids)
|
||||
(imap-message-get uids receive))))))
|
||||
|
||||
(defun imap-message-put (uid propname value &optional buffer)
|
||||
(with-current-buffer (or buffer (current-buffer))
|
||||
(if imap-message-data
|
||||
(put (intern (number-to-string uid) imap-message-data)
|
||||
propname value)
|
||||
(error "Imap-message-data is nil, uid %s prop %s value %s buffer %s"
|
||||
uid propname value (current-buffer)))
|
||||
t))
|
||||
(defun imap-message-put (uid propname value)
|
||||
(if imap-message-data
|
||||
(put (intern (number-to-string uid) imap-message-data)
|
||||
propname value)
|
||||
(error "Imap-message-data is nil, uid %s prop %s value %s buffer %s"
|
||||
uid propname value (current-buffer)))
|
||||
t)
|
||||
|
||||
(defun imap-message-get (uid propname &optional buffer)
|
||||
(with-current-buffer (or buffer (current-buffer))
|
||||
(get (intern-soft (number-to-string uid) imap-message-data)
|
||||
propname)))
|
||||
(defun imap-message-get (uid propname)
|
||||
(get (intern-soft (number-to-string uid) imap-message-data)
|
||||
propname))
|
||||
|
||||
(defun imap-message-map (func propname &optional buffer)
|
||||
(defun imap-message-map (func propname)
|
||||
"Map a function across each message in `imap-message-data', returning a list."
|
||||
(with-current-buffer (or buffer (current-buffer))
|
||||
(let (result)
|
||||
(mapatoms
|
||||
(lambda (s)
|
||||
(push (funcall func (get s 'UID) (get s propname)) result))
|
||||
imap-message-data)
|
||||
result)))
|
||||
(let (result)
|
||||
(mapatoms
|
||||
(lambda (s)
|
||||
(push (funcall func (get s 'UID) (get s propname)) result))
|
||||
imap-message-data)
|
||||
result))
|
||||
|
||||
(defmacro imap-message-envelope-date (uid &optional buffer)
|
||||
`(with-current-buffer (or ,buffer (current-buffer))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue