From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.help Subject: Re: CUA mode, turn off Shift+Curvor Move to Select Date: Sun, 31 Aug 2008 01:35:03 +0200 Message-ID: <48B9D927.4030207@gmail.com> References: <2d6948d6-f1d5-4b89-bd2a-cd8886e8f7a2@t1g2000pra.googlegroups.com> <51a05da4-537d-4ad5-a023-2c138b4e0969@a8g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1220139335 4182 80.91.229.12 (30 Aug 2008 23:35:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Aug 2008 23:35:35 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Xah Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Aug 31 01:36:28 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KZZzX-0003pA-JM for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Aug 2008 01:36:27 +0200 Original-Received: from localhost ([127.0.0.1]:44580 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KZZyY-0002tE-R0 for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Aug 2008 19:35:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KZZyH-0002sw-Da for help-gnu-emacs@gnu.org; Sat, 30 Aug 2008 19:35:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KZZyF-0002sk-1n for help-gnu-emacs@gnu.org; Sat, 30 Aug 2008 19:35:08 -0400 Original-Received: from [199.232.76.173] (port=45288 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KZZyE-0002sh-T7 for help-gnu-emacs@gnu.org; Sat, 30 Aug 2008 19:35:06 -0400 Original-Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:39494) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KZZyE-00043C-BI for help-gnu-emacs@gnu.org; Sat, 30 Aug 2008 19:35:06 -0400 Original-Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:63705 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KZZyC-0007ZA-8M; Sun, 31 Aug 2008 01:35:05 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <51a05da4-537d-4ad5-a023-2c138b4e0969@a8g2000prf.googlegroups.com> X-Enigmail-Version: 0.95.7 X-Antivirus: avast! (VPS 080830-0, 2008-08-30), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.87 X-Scan-Result: No virus found in message 1KZZyC-0007ZA-8M. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KZZyC-0007ZA-8M 0e5ac1aab89d0abf713af7dfa629aba0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57135 Archived-At: 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)" > 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/ >>> ☄ > >