GNU bug report logs - #21893
25.0.50; Using scroll-*-command in follow-mode

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 12 Nov 2015 21:09:02 UTC

Severity: wishlist

Tags: patch

Found in version 25.0.50

Fixed in version 27.0.50

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: 21893 <at> debbugs.gnu.org
Subject: bug#21893: 25.0.50; Using scroll-*-command in follow-mode
Date: Thu, 12 Nov 2015 23:07:50 +0200
follow.el could use better commands scroll-up-command/scroll-down-command
like in this patch to work smoothly when scroll-error-top-bottom is t,
but a special condition in follow-scroll-up/follow-scroll-down
that checks for scroll-preserve-screen-position prevents from scrolling
and returns point to the old position, and there is no comment
explaining this special-casing.

diff --git a/lisp/follow.el b/lisp/follow.el
index 938c59e..fa24a28 100644
--- a/lisp/follow.el
+++ b/lisp/follow.el
@@ -518,14 +518,14 @@ (defun follow-scroll-up (&optional arg)
 Works like `scroll-up' when not in Follow mode."
   (interactive "P")
   (cond ((not follow-mode)
-	 (scroll-up arg))
+	 (scroll-up-command arg))
 	((eq arg '-)
 	 (follow-scroll-down))
 	(t
 	 (let ((opoint (point))  (owin (selected-window)))
 	   (while
 	       ;; If we are too near EOB, try scrolling the previous window.
-	       (condition-case nil (progn (scroll-up arg) nil)
+	       (condition-case nil (progn (scroll-up-command arg) nil)
 		 (end-of-buffer
 		  (condition-case nil (progn (follow-previous-window) t)
 		    (error
@@ -551,12 +551,12 @@ (defun follow-scroll-down (&optional arg)
 Works like `scroll-down' when not in Follow mode."
   (interactive "P")
   (cond ((not follow-mode)
-	 (scroll-down arg))
+	 (scroll-down-command arg))
 	((eq arg '-)
 	 (follow-scroll-up))
 	(t
 	 (let ((opoint (point)))
-	   (scroll-down arg)
+	   (scroll-down-command arg)
 	   (unless (and scroll-preserve-screen-position
 			(get this-command 'scroll-command))
 	     (goto-char opoint))




This bug report was last modified 5 years and 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.