From: Xah <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: CUA mode, turn off Shift+Curvor Move to Select
Date: Thu, 4 Sep 2008 13:20:37 -0700 (PDT) [thread overview]
Message-ID: <2c82a057-54f5-4731-bd7f-1fa88ab3f858@a2g2000prm.googlegroups.com> (raw)
In-Reply-To: mailman.18209.1220371931.18990.help-gnu-emacs@gnu.org
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/
>
> > ☄
next prev parent reply other threads:[~2008-09-04 20:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-30 12:51 CUA mode, turn off Shift+Curvor Move to Select Xah
2008-08-30 14:00 ` Lennart Borgman (gmail)
[not found] ` <mailman.17996.1220104836.18990.help-gnu-emacs@gnu.org>
2008-08-30 21:34 ` Xah
2008-08-30 23:35 ` Lennart Borgman (gmail)
[not found] ` <mailman.18024.1220139310.18990.help-gnu-emacs@gnu.org>
2008-09-01 16:57 ` Xah
2008-09-01 21:03 ` Lennart Borgman (gmail)
[not found] ` <mailman.18147.1220303028.18990.help-gnu-emacs@gnu.org>
2008-09-02 2:13 ` Xah
2008-09-02 9:43 ` Lennart Borgman (gmail)
[not found] ` <mailman.18190.1220348616.18990.help-gnu-emacs@gnu.org>
2008-09-02 12:58 ` Xah
2008-09-02 16:12 ` Lennart Borgman (gmail)
[not found] ` <mailman.18209.1220371931.18990.help-gnu-emacs@gnu.org>
2008-09-04 20:20 ` Xah [this message]
2008-09-04 22:30 ` Lennart Borgman (gmail)
[not found] ` <mailman.18466.1220567455.18990.help-gnu-emacs@gnu.org>
2008-09-05 16:22 ` Xah
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2c82a057-54f5-4731-bd7f-1fa88ab3f858@a2g2000prm.googlegroups.com \
--to=xahlee@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).