summaryrefslogtreecommitdiffstatsabout
authorJulien Danjou <julien@danjou.info>2012-08-06 01:01:39 (GMT)
committer Julien Danjou <julien@danjou.info>2012-08-06 01:01:39 (GMT)
commitb12f45eae16c1be269eb0b35668e03c09aed831c (patch) (side-by-side diff)
treee2a2863639eec26c92775eb19d482c5d874ffb07
parent04ef2229b34193aeb8641a4daf8a9abe0e1a6376 (diff)
downloadgnus-b12f45eae16c1be269eb0b35668e03c09aed831c.zip
int, nnimap: remove to-buffer in request-head
Signed-off-by: Julien Danjou <julien@danjou.info>
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/gnus-int.el13
-rw-r--r--lisp/nnimap.el4
3 files changed, 12 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1fb9e88..9e1cc6e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
2012-08-06 Julien Danjou <julien@danjou.info>
+ * nnimap.el (nnimap-request-article): Remove to-buffer argument.
+
+ * gnus-int.el (gnus-request-head): Remove to-buffer argument, only
+ supported by nnimap actually. Reverts previous change.
+
* gnus-int.el (gnus-request-head): Add an optional to-buffer parameter
to mimic `gnus-request-article' and enjoy backends the nn*-request-head
to-buffer argument that is already supported.
diff --git a/lisp/gnus-int.el b/lisp/gnus-int.el
index 9898060..339e3d9 100644
--- a/lisp/gnus-int.el
+++ b/lisp/gnus-int.el
@@ -581,9 +581,8 @@ real group. Does nothing on a real group."
(and (bound-and-true-p gnus-registry-enabled)
(gnus-try-warping-via-registry))))))
-(defun gnus-request-head (article group &optional to-buffer)
- "Request the head of ARTICLE in GROUP.
-If TO-BUFFER, insert the article in that buffer."
+(defun gnus-request-head (article group)
+ "Request the head of ARTICLE in GROUP."
(let* ((gnus-command-method (gnus-find-method-for-group group))
(head (gnus-get-function gnus-command-method 'request-head t))
res clean-up)
@@ -601,15 +600,13 @@ If TO-BUFFER, insert the article in that buffer."
;; Use `head' function.
((fboundp head)
(setq res (funcall head article (gnus-group-real-name group)
- (nth 1 gnus-command-method)
- to-buffer)))
+ (nth 1 gnus-command-method))))
;; Use `article' function.
(t
- (setq res (gnus-request-article article group to-buffer)
+ (setq res (gnus-request-article article group)
clean-up t)))
(when clean-up
- (with-current-buffer (or to-buffer
- nntp-server-buffer)
+ (with-current-buffer nntp-server-buffer
(goto-char (point-min))
(when (search-forward "\n\n" nil t)
(delete-region (1- (point)) (point-max)))
diff --git a/lisp/nnimap.el b/lisp/nnimap.el
index ebd268e..e195b42 100644
--- a/lisp/nnimap.el
+++ b/lisp/nnimap.el
@@ -597,7 +597,7 @@ textual parts.")
(nnheader-ms-strip-cr)))
(cons group article)))))))
-(deffoo nnimap-request-head (article &optional group server to-buffer)
+(deffoo nnimap-request-head (article &optional group server)
(when group
(setq group (nnimap-decode-gnus-group group)))
(when (nnimap-change-group group server)
@@ -610,7 +610,7 @@ textual parts.")
article (format "UID FETCH %%d %s"
(nnimap-header-parameters)))
(let ((buffer (current-buffer)))
- (with-current-buffer (or to-buffer nntp-server-buffer)
+ (with-current-buffer nntp-server-buffer
(erase-buffer)
(insert-buffer-substring buffer)
(nnheader-ms-strip-cr)