all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: andrew.maguire@ps.ge.com
Cc: help-gnu-emacs@gnu.org
Subject: RE: repeat-complex-command on current marked region
Date: Wed, 3 Dec 2003 11:13:50 -0500	[thread overview]
Message-ID: <6192367D59F8904CA553579EF41FEEA00241AD09@ukcbgx01psge.geips.ge.com> (raw)

> If I use C-x ESC ESC to repeat a command, the previously marked region
> shows up as an argument.  For example:
> (replace-string "foo" "bar" nil 675 779)
> 
> What if I want to repeat the replacement on the current highlighted
> region, rather than from 675 to 779?
> 
> This used to work as desired in emacs 20.x,
> but it somehow changed in
> 21.x.

At Emacs 20, replace-string only took three args, i.e. it did not optionally
restrict replacements to a region.

At Emacs 21, two optional args were added to provide this region capability.
Since these are optional just edit the command perhaps to:
	(replace-string "foo" "bar" nil (point) (mark))
if you want to do it on a different region.

Or, don't forget that you can use M-p and M-n in the replace-string
interactive prompt to retrieve
previously entered strings.

Or, use narrow to region first.

Andrew

             reply	other threads:[~2003-12-03 16:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-03 16:13 andrew.maguire [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-12-02 20:16 repeat-complex-command on current marked region Spencer Thiel

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=6192367D59F8904CA553579EF41FEEA00241AD09@ukcbgx01psge.geips.ge.com \
    --to=andrew.maguire@ps.ge.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.