all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#21893: 25.0.50; Using scroll-*-command in follow-mode
@ 2015-11-12 21:07 Juri Linkov
  2019-06-25 14:55 ` Lars Ingebrigtsen
  2019-09-29 21:40 ` Stefan Kangas
  0 siblings, 2 replies; 8+ messages in thread
From: Juri Linkov @ 2015-11-12 21:07 UTC (permalink / raw)
  To: 21893

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))





^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-09-29 21:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-12 21:07 bug#21893: 25.0.50; Using scroll-*-command in follow-mode Juri Linkov
2019-06-25 14:55 ` Lars Ingebrigtsen
2019-06-25 20:10   ` Juri Linkov
2019-07-04 21:01     ` Juri Linkov
2019-07-05 18:44       ` Juri Linkov
2019-07-05 19:25         ` Eli Zaretskii
2019-07-07 22:36           ` Juri Linkov
2019-09-29 21:40 ` Stefan Kangas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.