From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Uday S Reddy Newsgroups: gmane.emacs.help Subject: Re: Ctrl-x Ctrl-x (exchange-point-and-mark) Date: Sun, 16 May 2010 11:50:05 +0100 Message-ID: References: <87d3x3wnkq.fsf@newsguy.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1274007061 2630 80.91.229.12 (16 May 2010 10:51:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 16 May 2010 10:51:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 16 12:51:00 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1ODbQx-0005tv-P0 for geh-help-gnu-emacs@m.gmane.org; Sun, 16 May 2010 12:51:00 +0200 Original-Received: from localhost ([127.0.0.1]:58753 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODbQx-0003th-74 for geh-help-gnu-emacs@m.gmane.org; Sun, 16 May 2010 06:50:59 -0400 Original-Received: from [140.186.70.92] (port=42381 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODbQN-0003t1-4P for help-gnu-emacs@gnu.org; Sun, 16 May 2010 06:50:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODbQL-0008RV-O5 for help-gnu-emacs@gnu.org; Sun, 16 May 2010 06:50:23 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:57285) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODbQL-0008RL-CB for help-gnu-emacs@gnu.org; Sun, 16 May 2010 06:50:21 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1ODbQJ-0005Va-DY for help-gnu-emacs@gnu.org; Sun, 16 May 2010 12:50:19 +0200 Original-Received: from cpc10-harb6-0-0-cust112.perr.cable.virginmedia.com ([92.232.137.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 16 May 2010 12:50:19 +0200 Original-Received: from u.s.reddy by cpc10-harb6-0-0-cust112.perr.cable.virginmedia.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 16 May 2010 12:50:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 20 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cpc10-harb6-0-0-cust112.perr.cable.virginmedia.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 In-Reply-To: <87d3x3wnkq.fsf@newsguy.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:73659 Archived-At: On 5/10/2010 8:42 PM, Harry Putnam wrote: > I see there are no customizing option matching > `exchange-point-and-mark' (Ctrl-x Ctrl-x) > > I wondered if I can do anyghing about the current behavior where when > the exchange is made, the area in between is selected and highlighted. If you put the following advice in your .emacs file, normal C-x C-x will have the effect of C-u C-x C-x and vice versa. (defadvice exchange-point-and-mark (before toggled-mark activate) "Toggle activation of mark for exchange-point-and-mark." (interactive "P") (ad-set-arg 0 (null (ad-get-arg 0)))) This doesn't quite do what I would have liked myself. Ideally, C-x C-x should keep the mark active if it is already active and refrain from activating it afresh. This advice ends up deactivating the mark. Can anybody beef up the advice more to get the better behavior? Cheers, Uday