From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "gamename" Newsgroups: gmane.emacs.help Subject: Re: setting continuation chars Date: 29 Jun 2006 04:24:27 -0700 Organization: http://groups.google.com Message-ID: <1151580267.871788.304480@m73g2000cwd.googlegroups.com> References: <1151522427.433692.320650@b68g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1151581239 15571 80.91.229.2 (29 Jun 2006 11:40:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Jun 2006 11:40:39 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 29 13:40:37 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fvusr-0007eH-28 for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Jun 2006 13:40:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fvusq-0000Nx-Is for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Jun 2006 07:40:32 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!m73g2000cwd.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-NNTP-Posting-Host: 128.107.248.220 Original-X-Trace: posting.google.com 1151580273 26565 127.0.0.1 (29 Jun 2006 11:24:33 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 29 Jun 2006 11:24:33 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: m73g2000cwd.googlegroups.com; posting-host=128.107.248.220; posting-account=l5OKnQ0AAADrHOPMVhCpAmIoocOY27KZ Original-Xref: shelby.stanford.edu gnu.emacs.help:140097 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:35722 Archived-At: Thanks Mathias! -T Mathias Dahl wrote: > "gamename" 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!