diff options
| author | Juri Linkov | 2010-04-06 02:44:24 +0300 |
|---|---|---|
| committer | Juri Linkov | 2010-04-06 02:44:24 +0300 |
| commit | 5a97d2da2c494cad346ee18dea5e207420c5a845 (patch) | |
| tree | 90e0f340ebacda6e379cbc48d794878980658a2a | |
| parent | 79ce172a464f2d5cced69f97fd86c4e03a0876a9 (diff) | |
| download | emacs-5a97d2da2c494cad346ee18dea5e207420c5a845.tar.gz emacs-5a97d2da2c494cad346ee18dea5e207420c5a845.zip | |
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.
| -rw-r--r-- | etc/NEWS | 3 | ||||
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/emulation/ws-mode.el | 10 | ||||
| -rw-r--r-- | lisp/simple.el | 20 |
4 files changed, 34 insertions, 10 deletions
| @@ -69,6 +69,9 @@ Use `set-scroll-bar-mode' to change this. | |||
| 69 | (bound to [next] and [prior]) does not signal errors at top/bottom | 69 | (bound to [next] and [prior]) does not signal errors at top/bottom |
| 70 | of buffer at first key-press (instead moves to top/bottom of buffer). | 70 | of buffer at first key-press (instead moves to top/bottom of buffer). |
| 71 | 71 | ||
| 72 | ** New scrolling commands `scroll-up-line' and `scroll-down-line' | ||
| 73 | scroll a line instead of full screen. | ||
| 74 | |||
| 72 | 75 | ||
| 73 | * Editing Changes in Emacs 24.1 | 76 | * Editing Changes in Emacs 24.1 |
| 74 | 77 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f343754e3d2..a9d95d9dd3d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,16 @@ | |||
| 1 | 2010-04-05 Juri Linkov <juri@jurta.org> | 1 | 2010-04-05 Juri Linkov <juri@jurta.org> |
| 2 | 2 | ||
| 3 | Scrolling commands which scroll a line instead of full screen. | ||
| 4 | http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01452.html | ||
| 5 | |||
| 6 | * simple.el (scroll-up-line, scroll-down-line): New commands. | ||
| 7 | Put property isearch-scroll=t on them. | ||
| 8 | |||
| 9 | * emulation/ws-mode.el (scroll-down-line, scroll-up-line): | ||
| 10 | Remove commands. | ||
| 11 | |||
| 12 | 2010-04-05 Juri Linkov <juri@jurta.org> | ||
| 13 | |||
| 3 | Scrolling commands which does not signal errors at top/bottom. | 14 | Scrolling commands which does not signal errors at top/bottom. |
| 4 | http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01452.html | 15 | http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01452.html |
| 5 | 16 | ||
diff --git a/lisp/emulation/ws-mode.el b/lisp/emulation/ws-mode.el index ed8b5562999..220ac7d67dc 100644 --- a/lisp/emulation/ws-mode.el +++ b/lisp/emulation/ws-mode.el | |||
| @@ -339,16 +339,6 @@ the distance between the end of the text and `fill-column'." | |||
| 339 | (+ left-margin | 339 | (+ left-margin |
| 340 | (/ (- fill-column left-margin line-length) 2)))))) | 340 | (/ (- fill-column left-margin line-length) 2)))))) |
| 341 | 341 | ||
| 342 | (defun scroll-down-line () | ||
| 343 | "Scroll one line down." | ||
| 344 | (interactive) | ||
| 345 | (scroll-down 1)) | ||
| 346 | |||
| 347 | (defun scroll-up-line () | ||
| 348 | "Scroll one line up." | ||
| 349 | (interactive) | ||
| 350 | (scroll-up 1)) | ||
| 351 | |||
| 352 | ;;;;;;;;;;; | 342 | ;;;;;;;;;;; |
| 353 | ;; wordstar special variables: | 343 | ;; wordstar special variables: |
| 354 | 344 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index 7616d19057a..66ea9ebebd9 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4800,6 +4800,26 @@ If ARG is the atom `-', scroll upward by nearly full screen." | |||
| 4800 | 4800 | ||
| 4801 | (put 'scroll-down-command 'isearch-scroll t) | 4801 | (put 'scroll-down-command 'isearch-scroll t) |
| 4802 | 4802 | ||
| 4803 | ;;; Scrolling commands which scroll a line instead of full screen. | ||
| 4804 | |||
| 4805 | (defun scroll-up-line (&optional arg) | ||
| 4806 | "Scroll text of selected window upward ARG lines; or one line if no ARG. | ||
| 4807 | If ARG is omitted or nil, scroll upward by one line. | ||
| 4808 | This is different from `scroll-up-command' that scrolls a full screen." | ||
| 4809 | (interactive "p") | ||
| 4810 | (scroll-up (or arg 1))) | ||
| 4811 | |||
| 4812 | (put 'scroll-up-line 'isearch-scroll t) | ||
| 4813 | |||
| 4814 | (defun scroll-down-line (&optional arg) | ||
| 4815 | "Scroll text of selected window down ARG lines; or one line if no ARG. | ||
| 4816 | If ARG is omitted or nil, scroll down by one line. | ||
| 4817 | This is different from `scroll-down-command' that scrolls a full screen." | ||
| 4818 | (interactive "p") | ||
| 4819 | (scroll-down (or arg 1))) | ||
| 4820 | |||
| 4821 | (put 'scroll-down-line 'isearch-scroll t) | ||
| 4822 | |||
| 4803 | 4823 | ||
| 4804 | (defun scroll-other-window-down (lines) | 4824 | (defun scroll-other-window-down (lines) |
| 4805 | "Scroll the \"other window\" down. | 4825 | "Scroll the \"other window\" down. |