changeset 64631:4556f884d581

Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-495 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 95) - Update from CVS 2005-07-25 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/gnus-art.el (gnus-article-next-page): Revert. (gnus-article-beginning-of-window): New macro. (gnus-article-next-page-1): Use it. (gnus-article-prev-page): Ditto. (gnus-mime-save-part-and-strip): Use insert-buffer-substring instead of insert-buffer. (gnus-mime-delete-part): Ditto. (gnus-article-edit-exit): Ditto. * lisp/gnus/gnus-util.el (gnus-beginning-of-window): Remove. (gnus-end-of-window): Remove. * lisp/gnus/lpath.el: Don't bind scroll-margin. 2005-07-25 Simon Josefsson <jas@extundo.com> * lisp/gnus/pgg.el (pgg-insert-url-with-w3): Don't load w3, it is possible to have the url package without w3. Reported by Daiki Ueno <ueno@unixuser.org> and Luigi Panzeri <matley@muppetslab.org>.
author Miles Bader <miles@gnu.org>
date Mon, 25 Jul 2005 21:35:55 +0000
parents 4e0e85061ae3
children 13b6920b1146
files lisp/gnus/ChangeLog lisp/gnus/gnus-art.el lisp/gnus/gnus-util.el lisp/gnus/pgg.el
diffstat 4 files changed, 43 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Mon Jul 25 14:21:04 2005 +0000
+++ b/lisp/gnus/ChangeLog	Mon Jul 25 21:35:55 2005 +0000
@@ -1,3 +1,25 @@
+2005-07-25  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus-art.el (gnus-article-next-page): Revert.
+	(gnus-article-beginning-of-window): New macro.
+	(gnus-article-next-page-1): Use it.
+	(gnus-article-prev-page): Ditto.
+	(gnus-mime-save-part-and-strip): Use insert-buffer-substring
+	instead of insert-buffer.
+	(gnus-mime-delete-part): Ditto.
+	(gnus-article-edit-exit): Ditto.
+
+	* gnus-util.el (gnus-beginning-of-window): Remove.
+	(gnus-end-of-window): Remove.
+
+	* lpath.el: Don't bind scroll-margin.
+
+2005-07-25  Simon Josefsson  <jas@extundo.com>
+
+	* pgg.el (pgg-insert-url-with-w3): Don't load w3, it is possible
+	to have the url package without w3.  Reported by Daiki Ueno
+	<ueno@unixuser.org> and Luigi Panzeri <matley@muppetslab.org>.
+
 2005-07-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* mml.el (mml-minibuffer-read-disposition): Don't use inline by default
--- a/lisp/gnus/gnus-art.el	Mon Jul 25 14:21:04 2005 +0000
+++ b/lisp/gnus/gnus-art.el	Mon Jul 25 21:35:55 2005 +0000
@@ -4117,7 +4117,7 @@
 		       ',gnus-newsgroup-ignored-charsets))
 		  (mbl mml-buffer-list))
 	      (setq mml-buffer-list nil)
-	      (insert-buffer gnus-original-article-buffer)
+	      (insert-buffer-substring gnus-original-article-buffer)
 	      (mime-to-mml ',handles)
 	      (setq gnus-article-mime-handles nil)
 	      (let ((mbl1 mml-buffer-list))
@@ -4199,7 +4199,7 @@
 		     ',gnus-newsgroup-ignored-charsets))
 		(mbl mml-buffer-list))
 	    (setq mml-buffer-list nil)
-	    (insert-buffer gnus-original-article-buffer)
+	    (insert-buffer-substring gnus-original-article-buffer)
 	    (mime-to-mml ',handles)
 	    (setq gnus-article-mime-handles nil)
 	    (let ((mbl1 mml-buffer-list))
@@ -5160,7 +5160,7 @@
 If end of article, return non-nil.  Otherwise return nil.
 Argument LINES specifies lines to be scrolled up."
   (interactive "p")
-  (gnus-end-of-window)
+  (move-to-window-line -1)
   (if (save-excursion
 	(end-of-line)
 	(and (pos-visible-in-window-p)	;Not continuation line.
@@ -5182,6 +5182,20 @@
     (gnus-article-next-page-1 lines)
     nil))
 
+(defmacro gnus-article-beginning-of-window ()
+  "Move point to the beginning of the window.
+In Emacs, the point is placed at the line number which `scroll-margin'
+specifies."
+  (if (featurep 'xemacs)
+      '(move-to-window-line 0)
+    '(move-to-window-line
+      (min (max 0 scroll-margin)
+	   (max 1 (- (window-height)
+		     (if mode-line-format 1 0)
+		     (if (and (boundp 'header-line-format)
+			      (symbol-value 'header-line-format))
+			 1 0)))))))
+
 (defun gnus-article-next-page-1 (lines)
   (let ((scroll-in-place nil))
     (condition-case ()
@@ -5189,13 +5203,13 @@
       (end-of-buffer
        ;; Long lines may cause an end-of-buffer error.
        (goto-char (point-max)))))
-  (gnus-beginning-of-window))
+  (gnus-article-beginning-of-window))
 
 (defun gnus-article-prev-page (&optional lines)
   "Show previous page of current article.
 Argument LINES specifies lines to be scrolled down."
   (interactive "p")
-  (gnus-beginning-of-window)
+  (move-to-window-line 0)
   (if (and gnus-page-broken
 	   (bobp)
 	   (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer?
@@ -5209,7 +5223,7 @@
 	      (scroll-down lines)
 	    (beginning-of-buffer
 	     (goto-char (point-min))))
-	(gnus-beginning-of-window)))))
+	(gnus-article-beginning-of-window)))))
 
 (defun gnus-article-only-boring-p ()
   "Decide whether there is only boring text remaining in the article.
@@ -5818,7 +5832,7 @@
 	  (window-start (window-start)))
       (erase-buffer)
       (if (gnus-buffer-live-p gnus-original-article-buffer)
-	  (insert-buffer gnus-original-article-buffer))
+	  (insert-buffer-substring gnus-original-article-buffer))
       (let ((winconf gnus-prev-winconf))
 	(kill-all-local-variables)
 	(gnus-article-mode)
--- a/lisp/gnus/gnus-util.el	Mon Jul 25 14:21:04 2005 +0000
+++ b/lisp/gnus/gnus-util.el	Mon Jul 25 21:35:55 2005 +0000
@@ -1577,30 +1577,6 @@
   (defalias 'gnus-set-process-query-on-exit-flag
     'process-kill-without-query))
 
-(defun gnus-beginning-of-window ()
-  "Move point to the beginning of the window."
-  (move-to-window-line
-   (if (featurep 'xemacs)
-       0
-     (min scroll-margin
-	  (max 1 (- (window-height)
-		    (if mode-line-format 1 0)
-		    (if (and (boundp 'header-line-format)
-			     (symbol-value 'header-line-format))
-			1 0)))))))
-
-(defun gnus-end-of-window ()
-  "Move point to the end of the window."
-  (move-to-window-line
-   (if (featurep 'xemacs)
-       -1
-     (max (- -1 scroll-margin)
-	  (- -1 (max 1 (- (window-height)
-			  (if mode-line-format 1 0)
-			  (if (and (boundp 'header-line-format)
-				   (symbol-value 'header-line-format))
-			      1 0))))))))
-
 (provide 'gnus-util)
 
 ;;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49
--- a/lisp/gnus/pgg.el	Mon Jul 25 14:21:04 2005 +0000
+++ b/lisp/gnus/pgg.el	Mon Jul 25 21:35:55 2005 +0000
@@ -410,7 +410,6 @@
 
 (defun pgg-insert-url-with-w3 (url)
   (ignore-errors
-    (require 'w3)
     (require 'url)
     (let (buffer-file-name)
       (url-insert-file-contents url))))