help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: CUA mode, turn off Shift+Curvor Move to Select


From: Xah
Subject: Re: CUA mode, turn off Shift+Curvor Move to Select
Date: Thu, 4 Sep 2008 13:20:37 -0700 (PDT)
User-agent: G2/1.0

Thanks a lot for the info Lennart.

I read the elisp doc on symbol properties.
I also tried the suggested solution, for some reason it doesn't seems
to work.

eval the following code and turn on cua mode.

(global-set-key (kbd "M-T") 'scroll-up)
(global-set-key (kbd "M-C") 'scroll-down)
(global-set-key (kbd "M-G") 'backward-paragraph)
(global-set-key (kbd "M-R") 'forward-paragraph)
; etc other commands bound with Shift key.

(add-hook 'cua-mode-hook
 (lambda ()
   (put cua-scroll-down 'CUA nil)
   (put cua-scroll-up 'CUA nil)
   (put backward-paragraph 'CUA nil)
   (put forward-paragraph 'CUA nil)
   (put beginning-of-buffer 'CUA nil)
   (put end-of-buffer 'CUA nil)
   (put move-end-of-line 'CUA nil)

   ;;(define-key cua-global-keymap (kbd "M-C") 'no-select-cua-scroll-
down)
   ;;(define-key cua-global-keymap (kbd "M-T") 'no-select-cua-scroll-
up)
   ;;(define-key cua-global-keymap (kbd "M-G") 'no-select-backward-
paragraph)
   ;;(define-key cua-global-keymap (kbd "M-R") 'no-select-forward-
paragraph)
   ;;(define-key cua-global-keymap (kbd "M-H") 'no-select-beginning-of-
buffer)
   ;;(define-key cua-global-keymap (kbd "M-N") 'no-select-end-of-
buffer)
   ;;(define-key cua-global-keymap (kbd "M-D") 'no-select-move-end-of-
line)
   )
 )

then, when you do a scroll-up/down via the keys above, scroll-down
still activates region selection. Though, scroll-up does not. Could
this be a bug?

Also, backward-paragraph, forward-paragraph, beginning-of-buffer, end-
of-buffer all still activates region selection...

  Xah
∑ http://xahlee.org/

☄



On Sep 2, 9:12 am, "Lennart Borgman (gmail)"
<lennart.borg...@gmail.com> wrote:
> Xahwrote:
> >Xahwrote: «CUA mode, turn off Shift+Curvor Move to Select»
>
> > Lennart Borgman wrote: « (put 'cua-scroll-up 'CUA 'move)»
>
> > Damn. Why didn't u be explicit before?
>
> Sorry, I did not remember the name then and thought I gave you enough info.
>
> > Ok, so if i want to use that, how excatly do i change it? remove the
> > property? change it to some other value?
>
> I have never done it, but I guess changing it to something else will do,
> for example
>
>   (put 'cua-scroll-up 'CUA nil)
>
> > am not familiar with lisp's function's properties. Will have to spend
> > a couple hours on this... but seems the solution i have works now. I
> > looked at cua-mode source code trying to find some comment or doc
> > about it but didn't see much... if you can give direct pointer,
> > that'll be great. Thanks.
>
> There is only symbol properties, not functions or variables dito.
>
> There is not much to learn
>
>   (info "(elisp) Symbol Plists")
>
> >  Xah
> > ∑http://xahlee.org/
>
> > ☄



reply via email to

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