unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>
To: help-gnu-emacs@gnu.org
Subject: Re: Ctrl-x Ctrl-x (exchange-point-and-mark)
Date: Sun, 16 May 2010 11:50:05 +0100	[thread overview]
Message-ID: <hsoil3$2em$1@dough.gmane.org> (raw)
In-Reply-To: <87d3x3wnkq.fsf@newsguy.com>

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






  parent reply	other threads:[~2010-05-16 10:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-10 19:42 Ctrl-x Ctrl-x (exchange-point-and-mark) Harry Putnam
2010-05-10 20:34 ` Sean Sieger
2010-05-11 10:53   ` Harry Putnam
2010-05-11 11:47     ` Richard Riley
2010-05-11 13:21       ` Harry Putnam
2010-05-11 14:06         ` Tim Visher
2010-05-11 22:02           ` Harry Putnam
2010-05-13 14:43             ` Tim Visher
2010-05-14  1:30               ` Harry Putnam
2010-05-11 14:07         ` Sean Sieger
     [not found]   ` <mailman.3.1273575216.918.help-gnu-emacs@gnu.org>
2010-05-11 11:38     ` Barry Margolin
2010-05-16  9:47   ` Uday S Reddy
2010-05-10 21:10 ` Štěpán Němec
2010-05-16 10:50 ` Uday S Reddy [this message]
     [not found] <mailman.10.1273520565.11383.help-gnu-emacs@gnu.org>
2010-05-10 21:01 ` Andreas Politz

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='hsoil3$2em$1@dough.gmane.org' \
    --to=u.s.reddy@cs.bham.ac.uk \
    --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).