From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "fcsaszar@gmail.com" Newsgroups: gmane.emacs.help Subject: Re: Changing keybinding of C-return under CUA mode Date: 8 Apr 2006 21:50:25 -0700 Organization: http://groups.google.com Message-ID: <1144558225.527832.123950@t31g2000cwb.googlegroups.com> References: <1142104477.631134.191970@v46g2000cwv.googlegroups.com> <1142297479.359356.104380@e56g2000cwe.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1144561226 27618 80.91.229.2 (9 Apr 2006 05:40:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 9 Apr 2006 05:40:26 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 09 07:40:25 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FSSes-0002V9-SX for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Apr 2006 07:40:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FSSes-0000vM-CF for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Apr 2006 01:40:22 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!t31g2000cwb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-NNTP-Posting-Host: 71.224.222.131 Original-X-Trace: posting.google.com 1144558230 17138 127.0.0.1 (9 Apr 2006 04:50:30 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sun, 9 Apr 2006 04:50:30 +0000 (UTC) In-Reply-To: <1142297479.359356.104380@e56g2000cwe.googlegroups.com> User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: t31g2000cwb.googlegroups.com; posting-host=71.224.222.131; posting-account=75K5rA0AAAAxbNgYm_tmp3CHGd-ExusQ Original-Xref: shelby.stanford.edu gnu.emacs.help:138630 Original-To: help-gnu-emacs@gnu.org 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:34248 Archived-At: Finally, after some trial and error and the help of Kim F. Storm, it worked. The code necessary is this: (add-hook 'cua-mode-hook '(lambda () (define-key cua--rectangle-keymap (kbd "C-.") 'cua-clear-rectangle-mark) (define-key cua--region-keymap (kbd "C-.") 'cua-toggle-rectangle-mark) (define-key cua-global-keymap (kbd "C-.") 'cua-set-rectangle-mark) (define-key cua--rectangle-keymap [(control return)] nil) (define-key cua--region-keymap [(control return)] nil) (define-key cua-global-keymap [(control return)] nil) ) ) (cua-mode t) I am posting this here because it may be useful for others. Regards, F.