[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: setting continuation chars
From: |
gamename |
Subject: |
Re: setting continuation chars |
Date: |
29 Jun 2006 04:24:27 -0700 |
User-agent: |
G2/0.2 |
Thanks Mathias!
-T
Mathias Dahl wrote:
> "gamename" <namesagame-usenet@yahoo.com> writes:
>
> > 2) use some sort of command (regex?) to insert the needed spaces up to
> > a certain column and then put in a backslash?
>
> Or, maybe something like this:
>
> (defun line-up-continuations ()
> "Line up all continuations from point and forward."
> (interactive)
> (save-excursion
> ;; Find backslash at the end of a line
> (while (search-forward-regexp "\\\\$" nil t)
> ;; Back up to set point before it
> (backward-char 1)
> ;; Indent to a fixed column
> (indent-to-column 40)
> ;; Step forward again, else the search will find
> ;; the same backslash again.
> (forward-char 1))))
>
> Replace `40' with whatever column number you like.
>
>
>
> Enjoy!