* gnus-art.el (gnus-article-next-page): Revert.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 25 Jul 2005 09:34:23 +0000 (09:34 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 25 Jul 2005 09:34:23 +0000 (09:34 +0000)
(gnus-article-beginning-of-window): New macro.
(gnus-article-next-page-1): Use it.
(gnus-article-prev-page): Ditto.
(gnus-article-edit-part): Use insert-buffer-substring instead of insert-buffer.
(gnus-article-edit-exit): Ditto.

* gnus-util.el (gnus-beginning-of-window): Remove.
(gnus-end-of-window): Remove.

* lpath.el: Don't bind header-line-format and scroll-margin.

lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-util.el
lisp/lpath.el

index 124fe1d..74d4a1c 100644 (file)
@@ -1,3 +1,18 @@
+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-article-edit-part): Use insert-buffer-substring instead of
+       insert-buffer.
+       (gnus-article-edit-exit): Ditto.
+
+       * gnus-util.el (gnus-beginning-of-window): Remove.
+       (gnus-end-of-window): Remove.
+
+       * lpath.el: Don't bind header-line-format and scroll-margin.
+
 2005-07-25  Simon Josefsson  <jas@extundo.com>
 
        * pgg.el (pgg-insert-url-with-w3): Don't load w3, it is possible
index 4c5aede..75de415 100644 (file)
@@ -4108,7 +4108,7 @@ and `gnus-mime-delete-part', and not provided at run-time normally."
                   ',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))
@@ -5164,7 +5164,7 @@ If given a numerical ARG, move forward ARG pages."
 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.
@@ -5186,6 +5186,18 @@ Argument LINES specifies lines to be scrolled up."
     (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 header-line-format 1 0)))))))
+
 (defun gnus-article-next-page-1 (lines)
   (let ((scroll-in-place nil))
     (condition-case ()
@@ -5193,13 +5205,13 @@ Argument LINES specifies lines to be scrolled up."
       (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?
@@ -5213,7 +5225,7 @@ Argument LINES specifies lines to be scrolled down."
              (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.
@@ -5819,7 +5831,7 @@ groups."
          (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)
index 71b2197..3274f5e 100644 (file)
@@ -1562,26 +1562,6 @@ empty directories from OLD-PATH."
   (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 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 header-line-format 1 0))))))))
-
 (provide 'gnus-util)
 
 ;;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49
index 2128c64..b9d7334 100644 (file)
                    current-language-environment
                    default-enable-multibyte-characters
                    enable-multibyte-characters gnus-agent-expire-current-dirs
-                   header-line-format language-info-alist mark-active
-                   mouse-selection-click-count
+                   language-info-alist mark-active mouse-selection-click-count
                    mouse-selection-click-count-buffer pgg-parse-crc24
-                   scroll-margin temporary-file-directory
-                   transient-mark-mode)))
+                   temporary-file-directory transient-mark-mode)))
   (maybe-fbind '(bbdb-complete-name
                 delete-annotation delete-extent device-connection dfw-device
                 events-to-keys font-lock-set-defaults frame-device