[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99898: Add variable scroll-error-top
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99898: Add variable scroll-error-top-bottom. |
Date: |
Wed, 14 Apr 2010 03:43:54 +0300 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99898
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Wed 2010-04-14 03:43:54 +0300
message:
Add variable scroll-error-top-bottom.
http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00403.html
* simple.el (scroll-error-top-bottom): New defcustom.
(scroll-up-command, scroll-down-command): Use it. Doc fix.
* emulation/pc-select.el (pc-select-override-scroll-error):
Obsolete in favor of `scroll-error-top-bottom'.
modified:
etc/NEWS
lisp/ChangeLog
lisp/emulation/pc-select.el
lisp/simple.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2010-04-14 00:11:21 +0000
+++ b/etc/NEWS 2010-04-14 00:43:54 +0000
@@ -69,8 +69,9 @@
with Xft.
** New scrolling commands `scroll-up-command' and `scroll-down-command'
-(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).
+(bound to C-v/[next] and M-v/[prior]) does not signal errors at top/bottom
+of buffer at first key-press (instead moves to top/bottom of buffer)
+when a new variable `scroll-error-top-bottom' is non-nil.
** New scrolling commands `scroll-up-line' and `scroll-down-line'
scroll a line instead of full screen.
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-04-14 00:33:32 +0000
+++ b/lisp/ChangeLog 2010-04-14 00:43:54 +0000
@@ -1,5 +1,13 @@
2010-04-14 Juri Linkov <address@hidden>
+ * simple.el (scroll-error-top-bottom): New defcustom.
+ (scroll-up-command, scroll-down-command): Use it. Doc fix.
+
+ * emulation/pc-select.el (pc-select-override-scroll-error):
+ Obsolete in favor of `scroll-error-top-bottom'.
+
+2010-04-14 Juri Linkov <address@hidden>
+
* tutorial.el (tutorial--default-keys): Rebind `C-v' to
`scroll-up-command' and `M-v' to `scroll-down-command'.
=== modified file 'lisp/emulation/pc-select.el'
--- a/lisp/emulation/pc-select.el 2010-03-12 17:47:22 +0000
+++ b/lisp/emulation/pc-select.el 2010-04-14 00:43:54 +0000
@@ -93,6 +93,9 @@
errors are suppressed."
:type 'boolean
:group 'pc-select)
+(define-obsolete-variable-alias 'pc-select-override-scroll-error
+ 'scroll-error-top-bottom
+ "24.1")
(defcustom pc-select-selection-keys-only nil
"*Non-nil means only bind the basic selection keys when started.
=== modified file 'lisp/simple.el'
--- a/lisp/simple.el 2010-04-14 00:11:21 +0000
+++ b/lisp/simple.el 2010-04-14 00:43:54 +0000
@@ -4744,20 +4744,34 @@
;;; of buffer at first key-press (instead moves to top/bottom
;;; of buffer).
+(defcustom scroll-error-top-bottom nil
+ "Move point to top/bottom of buffer before signalling a scrolling error.
+A value of nil means just signal an error if no more scrolling possible.
+A value of t means point moves to the beginning or the end of the buffer
+\(depending on scrolling direction) when no more scrolling possible.
+When point is already on that position, then signal an error."
+ :type 'boolean
+ :group 'scrolling
+ :version "24.1")
+
(defun scroll-up-command (&optional arg)
"Scroll text of selected window upward ARG lines; or near full screen if no
ARG.
-If `scroll-up' cannot scroll window further, move cursor to the bottom line.
+If `scroll-error-top-bottom' is non-nil and `scroll-up' cannot
+scroll window further, move cursor to the bottom line.
When point is already on that position, then signal an error.
A near full screen is `next-screen-context-lines' less than a full screen.
Negative ARG means scroll downward.
If ARG is the atom `-', scroll downward by nearly full screen."
(interactive "^P")
(cond
- ((eq arg '-) (scroll-down-command nil))
+ ((null scroll-error-top-bottom)
+ (scroll-up arg))
+ ((eq arg '-)
+ (scroll-down-command nil))
((< (prefix-numeric-value arg) 0)
(scroll-down-command (- (prefix-numeric-value arg))))
((eobp)
- (scroll-up arg)) ; signal error
+ (scroll-up arg)) ; signal error
(t
(condition-case nil
(scroll-up arg)
@@ -4775,18 +4789,22 @@
(defun scroll-down-command (&optional arg)
"Scroll text of selected window down ARG lines; or near full screen if no
ARG.
-If `scroll-down' cannot scroll window further, move cursor to the top line.
+If `scroll-error-top-bottom' is non-nil and `scroll-down' cannot
+scroll window further, move cursor to the top line.
When point is already on that position, then signal an error.
A near full screen is `next-screen-context-lines' less than a full screen.
Negative ARG means scroll upward.
If ARG is the atom `-', scroll upward by nearly full screen."
(interactive "^P")
(cond
- ((eq arg '-) (scroll-up-command nil))
+ ((null scroll-error-top-bottom)
+ (scroll-down arg))
+ ((eq arg '-)
+ (scroll-up-command nil))
((< (prefix-numeric-value arg) 0)
(scroll-up-command (- (prefix-numeric-value arg))))
((bobp)
- (scroll-down arg)) ; signal error
+ (scroll-down arg)) ; signal error
(t
(condition-case nil
(scroll-down arg)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99898: Add variable scroll-error-top-bottom.,
Juri Linkov <=