[gnus git] branch master updated: n0-17-7-g9856b95 =1= (nnheader-insert-buffer-substring): Renamed from nntp- and moved from that file for reuse.
Lars Magne Ingebrigtsen <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 9856b95426267b9eff45156d5cd9aa3a25fcf9eb (commit)
from c303783fd792c8664e203a87345fe79f98315560 (commit)
- Log -----------------------------------------------------------------
commit 9856b95426267b9eff45156d5cd9aa3a25fcf9eb
Author: Lars Magne Ingebrigtsen <[email protected]>
Date: Mon May 2 04:05:15 2011 +0200
(nnheader-insert-buffer-substring): Renamed from nntp- and moved from that file for reuse.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index aae2d14..deae452 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2011-05-02 Lars Magne Ingebrigtsen <[email protected]>
+ * nnheader.el (nnheader-insert-buffer-substring): Renamed from nntp-
+ and moved from that file for reuse.
+
* pop3.el (pop3-open-server): Error messages are "-ERR".
2011-05-01 Lars Magne Ingebrigtsen <[email protected]>
diff --git a/lisp/nnheader.el b/lisp/nnheader.el
index ae5893a..6f871cc 100644
--- a/lisp/nnheader.el
+++ b/lisp/nnheader.el
@@ -1099,6 +1099,19 @@ See `find-file-noselect' for the arguments."
backend-marks)))))
backend-marks)
+(defmacro nnheader-insert-buffer-substring (buffer &optional start end)
+ "Copy string from unibyte buffer to multibyte current buffer."
+ (if (featurep 'xemacs)
+ `(insert-buffer-substring ,buffer ,start ,end)
+ `(if enable-multibyte-characters
+ (insert (with-current-buffer ,buffer
+ (mm-string-to-multibyte
+ ,(if (or start end)
+ `(buffer-substring (or ,start (point-min))
+ (or ,end (point-max)))
+ '(buffer-string)))))
+ (insert-buffer-substring ,buffer ,start ,end))))
+
(when (featurep 'xemacs)
(require 'nnheaderxm))
diff --git a/lisp/nnimap.el b/lisp/nnimap.el
index 681d483..6882ed6 100644
--- a/lisp/nnimap.el
+++ b/lisp/nnimap.el
@@ -545,7 +545,7 @@ textual parts.")
(nnimap-get-whole-article article))
(let ((buffer (current-buffer)))
(with-current-buffer (or to-buffer nntp-server-buffer)
- (nntp-insert-buffer-substring buffer)
+ (nnheader-insert-buffer-substring buffer)
(nnheader-ms-strip-cr)))
(cons group article)))))))
diff --git a/lisp/nntp.el b/lisp/nntp.el
index c8f1d04..727d9b4 100644
--- a/lisp/nntp.el
+++ b/lisp/nntp.el
@@ -364,19 +364,6 @@ be restored and the command retried."
(throw 'nntp-with-open-group-error t))
-(defmacro nntp-insert-buffer-substring (buffer &optional start end)
- "Copy string from unibyte buffer to multibyte current buffer."
- (if (featurep 'xemacs)
- `(insert-buffer-substring ,buffer ,start ,end)
- `(if enable-multibyte-characters
- (insert (with-current-buffer ,buffer
- (mm-string-to-multibyte
- ,(if (or start end)
- `(buffer-substring (or ,start (point-min))
- (or ,end (point-max)))
- '(buffer-string)))))
- (insert-buffer-substring ,buffer ,start ,end))))
-
(defmacro nntp-copy-to-buffer (buffer start end)
"Copy string from unibyte current buffer to multibyte buffer."
(if (featurep 'xemacs)
@@ -434,7 +421,7 @@ be restored and the command retried."
(unless discard
(with-current-buffer buffer
(goto-char (point-max))
- (nntp-insert-buffer-substring (process-buffer process))
+ (nnheader-insert-buffer-substring (process-buffer process))
;; Nix out "nntp reading...." message.
(when nntp-have-messaged
(setq nntp-have-messaged nil)
@@ -996,7 +983,7 @@ command whose response triggered the error."
(narrow-to-region
(setq point (goto-char (point-max)))
(progn
- (nntp-insert-buffer-substring buf last-point (cdr entry))
+ (nnheader-insert-buffer-substring buf last-point (cdr entry))
(point-max)))
(setq last-point (cdr entry))
(nntp-decode-text)
@@ -1472,7 +1459,7 @@ password contained in '~/.nntp-authinfo'."
(goto-char (point-max))
(save-restriction
(narrow-to-region (point) (point))
- (nntp-insert-buffer-substring buf start)
+ (nnheader-insert-buffer-substring buf start)
(when decode
(nntp-decode-text))))))
;; report it.
@@ -1700,7 +1687,7 @@ password contained in '~/.nntp-authinfo'."
(when in-process-buffer-p
(set-buffer buf)
(goto-char (point-max))
- (nntp-insert-buffer-substring process-buffer)
+ (nnheader-insert-buffer-substring process-buffer)
(set-buffer process-buffer)
(erase-buffer)
(set-buffer buf))
-----------------------------------------------------------------------
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 | 3 +++
lisp/nnheader.el | 13 +++++++++++++
lisp/nnimap.el | 2 +-
lisp/nntp.el | 21 ++++-----------------
4 files changed, 21 insertions(+), 18 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