unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Mathias Dahl <brakjoller@gmail.com>
Subject: Re: setting continuation chars
Date: Thu, 29 Jun 2006 09:38:01 +0200	[thread overview]
Message-ID: <uirmkh0o6.fsf@gmail.com> (raw)
In-Reply-To: 1151522427.433692.320650@b68g2000cwa.googlegroups.com

"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!

  reply	other threads:[~2006-06-29  7:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-28 19:20 setting continuation chars gamename
2006-06-29  7:38 ` Mathias Dahl [this message]
2006-06-29 11:24   ` gamename
  -- strict thread matches above, loose matches on Subject: below --
2006-06-29 20:35 Jay Bingham
     [not found] <mailman.3529.1151613525.9609.help-gnu-emacs@gnu.org>
2006-07-08  8:47 ` gamename

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uirmkh0o6.fsf@gmail.com \
    --to=brakjoller@gmail.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).