[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: need help with a defun
From: |
Bernd Wolter |
Subject: |
Re: need help with a defun |
Date: |
08 Jul 2003 17:17:57 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Jesper Harder <harder@myrealbox.com> writes:
>
> 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")))
Thanks both to you and Joakim!
Both solutions work. It's so embarrassing - I put several evenings
into this and you come up with code so much more elegant and
efficient, seemingly on the fly.
I will study your solution Joakim and try to learn from it but for the
time being I'll stick to Jesper's partial solution so there will be
some of mine left over and will try to improve the rest along the
lines illustrated in the snippet above.
It's a long way from just cobbling together ill digested bits and
pieces to something really efficient like this - I will go on trying.
Thanks again
Bernd