unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Xah <xahlee@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: CUA mode, turn off Shift+Curvor Move to Select
Date: Sun, 31 Aug 2008 01:35:03 +0200	[thread overview]
Message-ID: <48B9D927.4030207@gmail.com> (raw)
In-Reply-To: <51a05da4-537d-4ad5-a023-2c138b4e0969@a8g2000prf.googlegroups.com>

Xah wrote:
> 2008-08-30
> 
> Thanks Lennart.
> 
> Now I'm trying to make the following keybindings:
> 
> (add-hook 'cua-mode-hook
>  (lambda ()
>  (define-key cua-global-keymap (kbd "M-C") 'scroll-down)
>  (define-key cua-global-keymap (kbd "M-T") 'scroll-up)
>  )
> ) ; Dvorak keyboard
> 
> So that, M-C will run scroll-down, instead of cua-scroll-down.
> However, it doesn't work.
> 
> Apparently, the cua-mode uses some mechanism that simply alias scroll-
> down to cua-scroll-down.
> 
> in cua-base.el, there's this line:
> 
>   ;; scrolling
>   (define-key cua-global-keymap [remap scroll-up]	'cua-scroll-up)
>   (define-key cua-global-keymap [remap scroll-down]	'cua-scroll-down)
> 
> What's the remap in the vector there?

Just search for this in the elisp manual

  C-s [remap

and you will get to the page

  (info "(elisp) Remapping Commands")

> How to do what i want?
> 
> Thanks
> 
>   Xah
> ∑ http://xahlee.org/
> 
> ☄
> 
> On Aug 30, 7:00 am, "Lennart Borgman (gmail)"
> <lennart.borg...@gmail.com> wrote:
>> Xahwrote:
>>> in CUA mode, is there a way to make it so that when Shift key is down
>>> and cursor is move, it doesn't select?
>> That would not really be CUA mode ...
>>
>>> That is, i want it to do
>>> (transient-mark-mode t)
>>> (delete-selection-mode t)
>>> and Ctrl+ZXCV for undo cut copy paste, but i don't want the Shift
>>> +CursorMove to Select behavior. (because that behavior is incompatible
>>> with my ergonomic keybinding. I need to suggest to users a way to turn
>>> this this off)
>> There is a property on the command symbol that controls this.
>>
>>> Alternatively, is there a way that only turn on the Ctrl+ZXCV
>>> shortcuts without all the other features?
>>> Thanks in advance again.
>>>  Xah
>>> ∑http://xahlee.org/
>>> ☄
> 
> 




  reply	other threads:[~2008-08-30 23:35 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) [this message]
     [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
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=48B9D927.4030207@gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=xahlee@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.
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).