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

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

Re: need help with a defun


From: Jesper Harder
Subject: Re: need help with a defun
Date: Tue, 08 Jul 2003 14:38:32 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Bernd Wolter <mathae.wolter@gmx.de> writes:

> after first step (done mostly via keep-lines):
>
> --------------------------------------------------------
> string1; string2; string3;
> string1; string2; string4;
> string2; string5;
> string4;
>
> --------------------------------------------------------
>
> after second step:
>
> --------------------------------------------------------
> string1
> string2
> string3
> string1
> string2
> string4
> string2
> string5
> string4
>
> The problem lies in step two and for that I used the slightly abridged
> (only for function names and doc string - to protect the innocent)
> defun I already posted.

I think this function does what you want:

(defun step-two ()
  (goto-char (point-min))
  (while (re-search-forward "; *\n*" nil t)
    (replace-match "\n")))


reply via email to

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