From: Juri Linkov <juri@jurta.org>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99831: Scrolling commands which does not signal errors at top/bottom.
Date: Tue, 06 Apr 2010 19:12:45 +0300 [thread overview]
Message-ID: <874ojozp27.fsf@mail.jurta.org> (raw)
In-Reply-To: <k2jf7ccd24b1004051858xb164a892p53a7b686d09ce703@mail.gmail.com> (Juanma Barranquero's message of "Tue, 6 Apr 2010 03:58:48 +0200")
> Fine. I'm talking about the case when point does not stay in the same
> screen. I mean, try
>
> emacs -Q --eval '(setq scroll-preserve-screen-position :always)'
>
> with emacs-23 and trunk, by moving the cursor to the end of some line
> in etc/NEWS and doing a few pg-up/pg-down, and I think you'll see the
> difference.
This means a customizable option is still necessary:
=== modified file 'lisp/emulation/pc-select.el'
--- lisp/emulation/pc-select.el 2010-04-05 22:54:57 +0000
+++ lisp/emulation/pc-select.el 2010-04-06 16:12:36 +0000
@@ -93,6 +93,9 @@ (defcustom pc-select-override-scroll-err
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'
--- lisp/simple.el 2010-04-06 13:08:58 +0000
+++ lisp/simple.el 2010-04-06 16:12:02 +0000
@@ -4877,6 +4877,16 @@ (define-globalized-minor-mode global-vis
;;; 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.
@@ -4886,6 +4896,8 @@ (defun scroll-up-command (&optional arg)
If ARG is the atom `-', scroll downward by nearly full screen."
(interactive "^P")
(cond
+ ((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))))
@@ -4914,11 +4926,13 @@ (defun scroll-down-command (&optional ar
If ARG is the atom `-', scroll upward by nearly full screen."
(interactive "^P")
(cond
+ ((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))))
=== modified file 'lisp/tutorial.el'
--- lisp/tutorial.el 2010-01-13 08:35:10 +0000
+++ lisp/tutorial.el 2010-04-06 16:10:38 +0000
@@ -218,8 +218,8 @@ (defconst tutorial--default-keys
(save-buffers-kill-terminal [?\C-x ?\C-c])
;; * SUMMARY
- (scroll-up [?\C-v])
- (scroll-down [?\M-v])
+ (scroll-up-command [?\C-v])
+ (scroll-down-command [?\M-v])
(recenter-top-bottom [?\C-l])
;; * BASIC CURSOR CONTROL
=== modified file 'src/window.c'
--- src/window.c 2010-04-05 22:54:57 +0000
+++ src/window.c 2010-04-06 16:09:50 +0000
@@ -7377,9 +7377,9 @@ (let ((edges (window-edges))) (- (nth 2
initial_define_key (control_x_map, '<', "scroll-left");
initial_define_key (control_x_map, '>', "scroll-right");
- initial_define_key (global_map, Ctl ('V'), "scroll-up");
+ initial_define_key (global_map, Ctl ('V'), "scroll-up-command");
initial_define_key (meta_map, Ctl ('V'), "scroll-other-window");
- initial_define_key (meta_map, 'v', "scroll-down");
+ initial_define_key (meta_map, 'v', "scroll-down-command");
}
/* arch-tag: 90a9c576-0590-48f1-a5f1-6c96a0452d9f
--
Juri Linkov
http://www.jurta.org/emacs/
next prev parent reply other threads:[~2010-04-06 16:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1NywTs-00007U-Lf@internal.in.savannah.gnu.org>
2010-04-06 0:51 ` [Emacs-diffs] /srv/bzr/emacs/trunk r99831: Scrolling commands which does not signal errors at top/bottom Juanma Barranquero
2010-04-06 0:59 ` Juri Linkov
2010-04-06 1:58 ` Juanma Barranquero
2010-04-06 16:12 ` Juri Linkov [this message]
2010-04-06 18:26 ` Juanma Barranquero
2010-04-06 20:19 ` Juri Linkov
2010-04-06 20:49 ` Juanma Barranquero
2010-04-06 21:06 ` Juri Linkov
2010-04-06 21:39 ` Juanma Barranquero
2010-04-06 21:47 ` Juanma Barranquero
2010-04-07 20:17 ` Juri Linkov
2010-04-07 22:16 ` Juanma Barranquero
2010-04-07 23:19 ` Juri Linkov
2010-04-07 23:35 ` Juanma Barranquero
2010-04-09 15:29 ` Stefan Monnier
2010-04-09 22:46 ` Juri Linkov
2010-04-10 14:51 ` Stefan Monnier
2010-04-14 16:49 ` Juri Linkov
2010-04-15 4:41 ` Stefan Monnier
2010-04-15 23:56 ` Juri Linkov
2010-04-16 0:41 ` Stefan Monnier
2010-04-16 1:27 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874ojozp27.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=emacs-devel@gnu.org \
--cc=lekktu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.