emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scrolling commands


From: Juri Linkov
Subject: Re: Scrolling commands
Date: Wed, 31 Mar 2010 18:07:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

>> This scrolling behavior is now implemented by the patch below
>> based on `cua-scroll-up' and `cua-scroll-down'.
>
>> +(define-key global-map [prior]         'scroll-down-command)
>> +(define-key global-map [next]          'scroll-up-command)
>
> I'm currently using CUA-mode, but I do
>
>   (define-key cua-global-keymap [remap scroll-up] nil)
>   (define-key cua-global-keymap [remap scroll-down] nil)
>
> because I don't want CUA-style scrolling. How will your patch affect me?

Yes, you now have to do:

  (define-key cua-global-keymap [remap scroll-up-command]   'scroll-up)
  (define-key cua-global-keymap [remap scroll-down-command] 'scroll-down)

Maybe with a new customizable variable this would be easier to do?

> And, BTW, shouldn't you also add scroll-(up|down)-command to the list
> around cua-base.el:1494?

Yes,

=== modified file 'lisp/emulation/cua-base.el'
--- lisp/emulation/cua-base.el  2010-01-13 08:35:10 +0000
+++ lisp/emulation/cua-base.el  2010-03-31 15:04:43 +0000
@@ -1440,6 +1440,8 @@ (defun cua--init-keymaps ()
   ;; scrolling
   (define-key cua-global-keymap [remap scroll-up]      'cua-scroll-up)
   (define-key cua-global-keymap [remap scroll-down]    'cua-scroll-down)
+  (define-key cua-global-keymap [remap scroll-up-command]   'cua-scroll-up)
+  (define-key cua-global-keymap [remap scroll-down-command] 'cua-scroll-down)
 
   (define-key cua--cua-keys-keymap [(control x) timeout] 'kill-region)
   (define-key cua--cua-keys-keymap [(control c) timeout] 'copy-region-as-kill)
@@ -1499,6 +1501,7 @@ (dolist (cmd
    move-end-of-line move-beginning-of-line
    end-of-buffer beginning-of-buffer
    scroll-up scroll-down
+   scroll-up-command scroll-down-command
    up-list down-list backward-up-list
    end-of-defun beginning-of-defun
    forward-sexp backward-sexp

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]