[gnus git] branch master updated: m0-5-77-g04ef222 =1= gnus-int: add to-buffer parameter to gnus-request-head
Julien Danjou <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 04ef2229b34193aeb8641a4daf8a9abe0e1a6376 (commit)
from 9b24844558188f1ced96e1e6f13c1d52e8b14775 (commit)
- Log -----------------------------------------------------------------
commit 04ef2229b34193aeb8641a4daf8a9abe0e1a6376
Author: Julien Danjou <[email protected]>
Date: Mon Aug 6 02:34:07 2012 +0200
gnus-int: add to-buffer parameter to gnus-request-head
Signed-off-by: Julien Danjou <[email protected]>
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1bf8444..1fb9e88 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2012-08-06 Julien Danjou <[email protected]>
+
+ * 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.
+
2012-08-05 Julien Danjou <[email protected]>
* gnus-demon.el (gnus-demon-add-handler, gnus-demon-remove-handler):
diff --git a/lisp/gnus-int.el b/lisp/gnus-int.el
index 339e3d9..9898060 100644
--- a/lisp/gnus-int.el
+++ b/lisp/gnus-int.el
@@ -581,8 +581,9 @@ 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)
- "Request the head of ARTICLE in GROUP."
+(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."
(let* ((gnus-command-method (gnus-find-method-for-group group))
(head (gnus-get-function gnus-command-method 'request-head t))
res clean-up)
@@ -600,13 +601,15 @@ real group. Does nothing on a real group."
;; Use `head' function.
((fboundp head)
(setq res (funcall head article (gnus-group-real-name group)
- (nth 1 gnus-command-method))))
+ (nth 1 gnus-command-method)
+ to-buffer)))
;; Use `article' function.
(t
- (setq res (gnus-request-article article group)
+ (setq res (gnus-request-article article group to-buffer)
clean-up t)))
(when clean-up
- (with-current-buffer nntp-server-buffer
+ (with-current-buffer (or to-buffer
+ nntp-server-buffer)
(goto-char (point-min))
(when (search-forward "\n\n" nil t)
(delete-region (1- (point)) (point-max)))
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 6 ++++++
lisp/gnus-int.el | 13 ++++++++-----
2 files changed, 14 insertions(+), 5 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project