changeset 107785:1479a3d1e0f3

Scrolling commands which scroll a line instead of full screen.. http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01452.html * simple.el (scroll-up-line, scroll-down-line): New commands. Put property isearch-scroll=t on them. * emulation/ws-mode.el (scroll-down-line, scroll-up-line): Remove commands.
author Juri Linkov <juri@jurta.org>
date Tue, 06 Apr 2010 02:44:24 +0300
parents 45b05d993766
children 3de4f4f86a82
files etc/NEWS lisp/ChangeLog lisp/emulation/ws-mode.el lisp/simple.el
diffstat 4 files changed, 34 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS	Tue Apr 06 02:38:53 2010 +0300
+++ b/etc/NEWS	Tue Apr 06 02:44:24 2010 +0300
@@ -69,6 +69,9 @@
 (bound to [next] and [prior]) does not signal errors at top/bottom
 of buffer at first key-press (instead moves to top/bottom of buffer).
 
+** New scrolling commands `scroll-up-line' and `scroll-down-line'
+scroll a line instead of full screen.
+
 
 * Editing Changes in Emacs 24.1
 
--- a/lisp/ChangeLog	Tue Apr 06 02:38:53 2010 +0300
+++ b/lisp/ChangeLog	Tue Apr 06 02:44:24 2010 +0300
@@ -1,3 +1,14 @@
+2010-04-05  Juri Linkov  <juri@jurta.org>
+
+	Scrolling commands which scroll a line instead of full screen.
+	http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01452.html
+
+	* simple.el (scroll-up-line, scroll-down-line): New commands.
+	Put property isearch-scroll=t on them.
+
+	* emulation/ws-mode.el (scroll-down-line, scroll-up-line):
+	Remove commands.
+
 2010-04-05  Juri Linkov  <juri@jurta.org>
 
 	Scrolling commands which does not signal errors at top/bottom.
--- a/lisp/emulation/ws-mode.el	Tue Apr 06 02:38:53 2010 +0300
+++ b/lisp/emulation/ws-mode.el	Tue Apr 06 02:44:24 2010 +0300
@@ -339,16 +339,6 @@
        (+ left-margin
 	  (/ (- fill-column left-margin line-length) 2))))))
 
-(defun scroll-down-line ()
-  "Scroll one line down."
-  (interactive)
-  (scroll-down 1))
-
-(defun scroll-up-line ()
-  "Scroll one line up."
-  (interactive)
-  (scroll-up 1))
-
 ;;;;;;;;;;;
 ;; wordstar special variables:
 
--- a/lisp/simple.el	Tue Apr 06 02:38:53 2010 +0300
+++ b/lisp/simple.el	Tue Apr 06 02:44:24 2010 +0300
@@ -4800,6 +4800,26 @@
 
 (put 'scroll-down-command 'isearch-scroll t)
 
+;;; Scrolling commands which scroll a line instead of full screen.
+
+(defun scroll-up-line (&optional arg)
+  "Scroll text of selected window upward ARG lines; or one line if no ARG.
+If ARG is omitted or nil, scroll upward by one line.
+This is different from `scroll-up-command' that scrolls a full screen."
+  (interactive "p")
+  (scroll-up (or arg 1)))
+
+(put 'scroll-up-line 'isearch-scroll t)
+
+(defun scroll-down-line (&optional arg)
+  "Scroll text of selected window down ARG lines; or one line if no ARG.
+If ARG is omitted or nil, scroll down by one line.
+This is different from `scroll-down-command' that scrolls a full screen."
+  (interactive "p")
+  (scroll-down (or arg 1)))
+
+(put 'scroll-down-line 'isearch-scroll t)
+
 
 (defun scroll-other-window-down (lines)
   "Scroll the \"other window\" down.