all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: LanX <lanx.perl@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: restore region after replace-string
Date: Sun, 16 Jan 2011 10:24:46 -0800 (PST)	[thread overview]
Message-ID: <1635f76f-42cb-493d-aaa0-9cdb96ace0fd@k3g2000yqc.googlegroups.com> (raw)
In-Reply-To: mailman.15.1295181948.22773.help-gnu-emacs@gnu.org

Hi Paul

I dunno why your approaches aren't working, and you seem to be much
more proficient with elisp than me. :)

Anyway Le's suggestion works flawlessly for me:

(defun rs ()
  (interactive)
  (let (deactivate-mark)
    (save-excursion (call-interactively 'replace-string))
    (exchange-point-and-mark)
    (exchange-point-and-mark))
)

HTH
  Rolf


  parent reply	other threads:[~2011-01-16 18:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.10.1295051790.18911.help-gnu-emacs@gnu.org>
2011-01-15 13:23 ` restore region after replace-string LanX
2011-01-15 20:07   ` Paul Madden
2011-01-16 10:28   ` Le Wang
2011-01-16 17:08     ` Paul Madden
2011-01-17  2:22       ` Le Wang
2011-01-17  2:38         ` Paul Madden
     [not found]   ` <mailman.15.1295181948.22773.help-gnu-emacs@gnu.org>
2011-01-16 18:24     ` LanX [this message]
2011-01-14 22:57 Paul Madden

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1635f76f-42cb-493d-aaa0-9cdb96ace0fd@k3g2000yqc.googlegroups.com \
    --to=lanx.perl@googlemail.com \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.