help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Yet another rookie question replace-regexp


From: Michael Cadilhac
Subject: Re: Yet another rookie question replace-regexp
Date: Wed, 08 Mar 2006 11:40:45 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

"billy" <bp1497@att.com> writes:

> I know how to use this on a whole file. but how can I make this work on
> a region?
> If I want to comment out a 50 lines of 10k I don't want to comment out
> each line one at a time.  I would like to do C-space bar them move
> below the last line I want to effect, the do the replace-regexp.  But
> his does the whole file.  I pass it  ^ / #

,----[ C-h f replace-string RET ]
| replace-string is an interactive compiled Lisp function in `replace.el'.
| (replace-string from-string to-string &optional delimited start end)
| 
| Replace occurrences of from-string with to-string.
| [...]
| In Transient Mark mode, if the mark is active, operate on the contents
| of the region.  Otherwise, operate from point to the end of the buffer.
| [...]
| 
| [back]
`----

  In other words, you just have to activate the Transient Mark while
  selecting your region.

  In Emacs CVS it's done temporarily by hitting C-space twice.

-- 
    Michael Cadilhac, a.k.a. Micha [mika] |
                    Epita/LRDE promo 2007 |   )\._.,--....,'``.
123 av. de Fontainebleau | 08.70.65.13.14 |  /.  _.. \   _\  (` ._,.
94270 Le Kremlin Bicetre | 06.23.20.31.30 | '._.-(,_..'--(,_...`-..'




reply via email to

[Prev in Thread] Current Thread [Next in Thread]