diff options
| author | Lars Magne Ingebrigtsen | 2010-09-06 00:06:55 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-09-06 00:06:55 +0000 |
| commit | f292afe545b3fa9a6aae1ff0ec72bf15557bc662 (patch) | |
| tree | c3cfd930405c55c1af2d4dbf969ffe72b1c7aa89 | |
| parent | 3733ba53bb2f0970e17867e2e611ddc05ce1740d (diff) | |
| download | emacs-f292afe545b3fa9a6aae1ff0ec72bf15557bc662.tar.gz emacs-f292afe545b3fa9a6aae1ff0ec72bf15557bc662.zip | |
nnimap.el (nnimap-debug): Removed; imap.el: Remove an optional buffer parameter from many functions.
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 1 | ||||
| -rw-r--r-- | lisp/gnus/nnimap.el | 71 | ||||
| -rw-r--r-- | lisp/net/imap.el | 86 |
4 files changed, 56 insertions, 112 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index add576c5c88..4ec7ca6b476 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,15 @@ | |||
| 1 | 2010-09-05 Lars Magne Ingebrigtsen <larsi@gnus.org> | 1 | 2010-09-05 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 2 | ||
| 3 | * net/imap.el (imap-message-map): Removed optional buffer parameter, | ||
| 4 | since no callers use it. | ||
| 5 | (imap-message-get): Ditto. | ||
| 6 | (imap-message-put): Ditto. | ||
| 7 | (imap-mailbox-map): Ditto. | ||
| 8 | (imap-mailbox-put): Ditto. | ||
| 9 | (imap-mailbox-get): Ditto. | ||
| 10 | |||
| 11 | 2010-09-05 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 12 | |||
| 3 | * net/imap.el (imap-fetch-safe): Removed function, and altered all | 13 | * net/imap.el (imap-fetch-safe): Removed function, and altered all |
| 4 | callers to use `imap-fetch' instead. According to the comments, this | 14 | callers to use `imap-fetch' instead. According to the comments, this |
| 5 | should be safe, since all other IMAP clients use the 1:* syntax. | 15 | should be safe, since all other IMAP clients use the 1:* syntax. |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index d6d1f655404..0a6c76a1d2d 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | * nnimap.el (nnimap-request-list): Servers may return \NoSelect | 3 | * nnimap.el (nnimap-request-list): Servers may return \NoSelect |
| 4 | case-insensitively. | 4 | case-insensitively. |
| 5 | (nnimap-debug): Removed. | ||
| 5 | 6 | ||
| 6 | * mail-source.el (mail-source-fetch): Don't message if we're fetching | 7 | * mail-source.el (mail-source-fetch): Don't message if we're fetching |
| 7 | mail from a file, and the file doesn't exist. | 8 | mail from a file, and the file doesn't exist. |
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index ba989a01194..e6a7f740d23 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -589,10 +589,11 @@ If EXAMINE is non-nil the group is selected read-only." | |||
| 589 | (let (minuid maxuid) | 589 | (let (minuid maxuid) |
| 590 | (when (> (imap-mailbox-get 'exists) 0) | 590 | (when (> (imap-mailbox-get 'exists) 0) |
| 591 | (imap-fetch "1:*" "UID" nil 'nouidfetch) | 591 | (imap-fetch "1:*" "UID" nil 'nouidfetch) |
| 592 | (imap-message-map (lambda (uid Uid) | 592 | (imap-message-map |
| 593 | (setq minuid (if minuid (min minuid uid) uid) | 593 | (lambda (uid Uid) |
| 594 | maxuid (if maxuid (max maxuid uid) uid))) | 594 | (setq minuid (if minuid (min minuid uid) uid) |
| 595 | 'UID)) | 595 | maxuid (if maxuid (max maxuid uid) uid))) |
| 596 | 'UID)) | ||
| 596 | (list (imap-mailbox-get 'exists) minuid maxuid)))))) | 597 | (list (imap-mailbox-get 'exists) minuid maxuid)))))) |
| 597 | 598 | ||
| 598 | (defun nnimap-possibly-change-group (group &optional server) | 599 | (defun nnimap-possibly-change-group (group &optional server) |
| @@ -1813,68 +1814,6 @@ be used in a STORE FLAGS command." | |||
| 1813 | "Return t if MARK can be permanently (between IMAP sessions) saved on articles, in GROUP." | 1814 | "Return t if MARK can be permanently (between IMAP sessions) saved on articles, in GROUP." |
| 1814 | (imap-message-flag-permanent-p (nnimap-mark-to-flag mark))) | 1815 | (imap-message-flag-permanent-p (nnimap-mark-to-flag mark))) |
| 1815 | 1816 | ||
| 1816 | (when nnimap-debug | ||
| 1817 | (require 'trace) | ||
| 1818 | (buffer-disable-undo (get-buffer-create nnimap-debug-buffer)) | ||
| 1819 | (mapc (lambda (f) (trace-function-background f nnimap-debug-buffer)) | ||
| 1820 | '( | ||
| 1821 | nnimap-possibly-change-server | ||
| 1822 | nnimap-verify-uidvalidity | ||
| 1823 | nnimap-find-minmax-uid | ||
| 1824 | nnimap-before-find-minmax-bugworkaround | ||
| 1825 | nnimap-possibly-change-group | ||
| 1826 | ;;nnimap-replace-whitespace | ||
| 1827 | nnimap-retrieve-headers-progress | ||
| 1828 | nnimap-retrieve-which-headers | ||
| 1829 | nnimap-group-overview-filename | ||
| 1830 | nnimap-retrieve-headers-from-file | ||
| 1831 | nnimap-retrieve-headers-from-server | ||
| 1832 | nnimap-retrieve-headers | ||
| 1833 | nnimap-open-connection | ||
| 1834 | nnimap-open-server | ||
| 1835 | nnimap-server-opened | ||
| 1836 | nnimap-close-server | ||
| 1837 | nnimap-request-close | ||
| 1838 | nnimap-status-message | ||
| 1839 | ;;nnimap-demule | ||
| 1840 | nnimap-request-article-part | ||
| 1841 | nnimap-request-article | ||
| 1842 | nnimap-request-head | ||
| 1843 | nnimap-request-body | ||
| 1844 | nnimap-request-group | ||
| 1845 | nnimap-close-group | ||
| 1846 | nnimap-pattern-to-list-arguments | ||
| 1847 | nnimap-request-list | ||
| 1848 | nnimap-request-post | ||
| 1849 | nnimap-retrieve-groups | ||
| 1850 | nnimap-request-update-info-internal | ||
| 1851 | nnimap-request-type | ||
| 1852 | nnimap-request-set-mark | ||
| 1853 | nnimap-split-to-groups | ||
| 1854 | nnimap-split-find-rule | ||
| 1855 | nnimap-split-find-inbox | ||
| 1856 | nnimap-split-articles | ||
| 1857 | nnimap-request-scan | ||
| 1858 | nnimap-request-newgroups | ||
| 1859 | nnimap-request-create-group | ||
| 1860 | nnimap-time-substract | ||
| 1861 | nnimap-date-days-ago | ||
| 1862 | nnimap-request-expire-articles-progress | ||
| 1863 | nnimap-request-expire-articles | ||
| 1864 | nnimap-request-move-article | ||
| 1865 | nnimap-request-accept-article | ||
| 1866 | nnimap-request-delete-group | ||
| 1867 | nnimap-request-rename-group | ||
| 1868 | gnus-group-nnimap-expunge | ||
| 1869 | gnus-group-nnimap-edit-acl | ||
| 1870 | gnus-group-nnimap-edit-acl-done | ||
| 1871 | nnimap-group-mode-hook | ||
| 1872 | nnimap-mark-to-predicate | ||
| 1873 | nnimap-mark-to-flag-1 | ||
| 1874 | nnimap-mark-to-flag | ||
| 1875 | nnimap-mark-permanent-p | ||
| 1876 | ))) | ||
| 1877 | |||
| 1878 | (provide 'nnimap) | 1817 | (provide 'nnimap) |
| 1879 | 1818 | ||
| 1880 | ;;; nnimap.el ends here | 1819 | ;;; nnimap.el ends here |
diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 2580635b03f..5c30a5788d8 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el | |||
| @@ -1303,40 +1303,37 @@ If BUFFER is nil, the current buffer is assumed." | |||
| 1303 | 1303 | ||
| 1304 | ;; Mailbox functions: | 1304 | ;; Mailbox functions: |
| 1305 | 1305 | ||
| 1306 | (defun imap-mailbox-put (propname value &optional mailbox buffer) | 1306 | (defun imap-mailbox-put (propname value &optional mailbox) |
| 1307 | (with-current-buffer (or buffer (current-buffer)) | 1307 | (if imap-mailbox-data |
| 1308 | (if imap-mailbox-data | 1308 | (put (intern (or mailbox imap-current-mailbox) imap-mailbox-data) |
| 1309 | (put (intern (or mailbox imap-current-mailbox) imap-mailbox-data) | 1309 | propname value) |
| 1310 | propname value) | 1310 | (error "Imap-mailbox-data is nil, prop %s value %s mailbox %s buffer %s" |
| 1311 | (error "Imap-mailbox-data is nil, prop %s value %s mailbox %s buffer %s" | 1311 | propname value mailbox (current-buffer))) |
| 1312 | propname value mailbox (current-buffer))) | 1312 | t) |
| 1313 | t)) | ||
| 1314 | 1313 | ||
| 1315 | (defsubst imap-mailbox-get-1 (propname &optional mailbox) | 1314 | (defsubst imap-mailbox-get-1 (propname &optional mailbox) |
| 1316 | (get (intern-soft (or mailbox imap-current-mailbox) imap-mailbox-data) | 1315 | (get (intern-soft (or mailbox imap-current-mailbox) imap-mailbox-data) |
| 1317 | propname)) | 1316 | propname)) |
| 1318 | 1317 | ||
| 1319 | (defun imap-mailbox-get (propname &optional mailbox buffer) | 1318 | (defun imap-mailbox-get (propname &optional mailbox) |
| 1320 | (let ((mailbox (imap-utf7-encode mailbox))) | 1319 | (imap-mailbox-get-1 propname (or (imap-utf7-encode mailbox) |
| 1321 | (with-current-buffer (or buffer (current-buffer)) | 1320 | imap-current-mailbox))) |
| 1322 | (imap-mailbox-get-1 propname (or mailbox imap-current-mailbox))))) | 1321 | |
| 1323 | 1322 | (defun imap-mailbox-map-1 (func &optional mailbox-decoder) | |
| 1324 | (defun imap-mailbox-map-1 (func &optional mailbox-decoder buffer) | 1323 | (let (result) |
| 1325 | (with-current-buffer (or buffer (current-buffer)) | 1324 | (mapatoms |
| 1326 | (let (result) | 1325 | (lambda (s) |
| 1327 | (mapatoms | 1326 | (push (funcall func (if mailbox-decoder |
| 1328 | (lambda (s) | 1327 | (funcall mailbox-decoder (symbol-name s)) |
| 1329 | (push (funcall func (if mailbox-decoder | 1328 | (symbol-name s))) result)) |
| 1330 | (funcall mailbox-decoder (symbol-name s)) | 1329 | imap-mailbox-data) |
| 1331 | (symbol-name s))) result)) | 1330 | result)) |
| 1332 | imap-mailbox-data) | 1331 | |
| 1333 | result))) | 1332 | (defun imap-mailbox-map (func) |
| 1334 | |||
| 1335 | (defun imap-mailbox-map (func &optional buffer) | ||
| 1336 | "Map a function across each mailbox in `imap-mailbox-data', returning a list. | 1333 | "Map a function across each mailbox in `imap-mailbox-data', returning a list. |
| 1337 | Function should take a mailbox name (a string) as | 1334 | Function should take a mailbox name (a string) as |
| 1338 | the only argument." | 1335 | the only argument." |
| 1339 | (imap-mailbox-map-1 func 'imap-utf7-decode buffer)) | 1336 | (imap-mailbox-map-1 func 'imap-utf7-decode)) |
| 1340 | 1337 | ||
| 1341 | (defun imap-current-mailbox (&optional buffer) | 1338 | (defun imap-current-mailbox (&optional buffer) |
| 1342 | (with-current-buffer (or buffer (current-buffer)) | 1339 | (with-current-buffer (or buffer (current-buffer)) |
| @@ -1650,29 +1647,26 @@ is non-nil return these properties." | |||
| 1650 | uids) | 1647 | uids) |
| 1651 | (imap-message-get uids receive)))))) | 1648 | (imap-message-get uids receive)))))) |
| 1652 | 1649 | ||
| 1653 | (defun imap-message-put (uid propname value &optional buffer) | 1650 | (defun imap-message-put (uid propname value) |
| 1654 | (with-current-buffer (or buffer (current-buffer)) | 1651 | (if imap-message-data |
| 1655 | (if imap-message-data | 1652 | (put (intern (number-to-string uid) imap-message-data) |
| 1656 | (put (intern (number-to-string uid) imap-message-data) | 1653 | propname value) |
| 1657 | propname value) | 1654 | (error "Imap-message-data is nil, uid %s prop %s value %s buffer %s" |
| 1658 | (error "Imap-message-data is nil, uid %s prop %s value %s buffer %s" | 1655 | uid propname value (current-buffer))) |
| 1659 | uid propname value (current-buffer))) | 1656 | t) |
| 1660 | t)) | ||
| 1661 | 1657 | ||
| 1662 | (defun imap-message-get (uid propname &optional buffer) | 1658 | (defun imap-message-get (uid propname) |
| 1663 | (with-current-buffer (or buffer (current-buffer)) | 1659 | (get (intern-soft (number-to-string uid) imap-message-data) |
| 1664 | (get (intern-soft (number-to-string uid) imap-message-data) | 1660 | propname)) |
| 1665 | propname))) | ||
| 1666 | 1661 | ||
| 1667 | (defun imap-message-map (func propname &optional buffer) | 1662 | (defun imap-message-map (func propname) |
| 1668 | "Map a function across each message in `imap-message-data', returning a list." | 1663 | "Map a function across each message in `imap-message-data', returning a list." |
| 1669 | (with-current-buffer (or buffer (current-buffer)) | 1664 | (let (result) |
| 1670 | (let (result) | 1665 | (mapatoms |
| 1671 | (mapatoms | 1666 | (lambda (s) |
| 1672 | (lambda (s) | 1667 | (push (funcall func (get s 'UID) (get s propname)) result)) |
| 1673 | (push (funcall func (get s 'UID) (get s propname)) result)) | 1668 | imap-message-data) |
| 1674 | imap-message-data) | 1669 | result)) |
| 1675 | result))) | ||
| 1676 | 1670 | ||
| 1677 | (defmacro imap-message-envelope-date (uid &optional buffer) | 1671 | (defmacro imap-message-envelope-date (uid &optional buffer) |
| 1678 | `(with-current-buffer (or ,buffer (current-buffer)) | 1672 | `(with-current-buffer (or ,buffer (current-buffer)) |