From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Monsson Newsgroups: gmane.emacs.help Subject: Re: Adding multi-group regexps to align-rules-list Date: Fri, 22 May 2009 12:05:03 -0700 (PDT) Organization: http://groups.google.com Message-ID: <0313c784-5f25-4c15-8d34-02cedd02f298@k2g2000yql.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1243021249 23764 80.91.229.12 (22 May 2009 19:40:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 May 2009 19:40:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 22 21:40:42 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M7abf-0001ZB-AR for geh-help-gnu-emacs@m.gmane.org; Fri, 22 May 2009 21:40:39 +0200 Original-Received: from localhost ([127.0.0.1]:43162 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M7abe-0004oY-QK for geh-help-gnu-emacs@m.gmane.org; Fri, 22 May 2009 15:40:38 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!postnews.google.com!k2g2000yql.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-NNTP-Posting-Host: 212.242.197.46 Original-X-Trace: posting.google.com 1243019103 30511 127.0.0.1 (22 May 2009 19:05:03 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 22 May 2009 19:05:03 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k2g2000yql.googlegroups.com; posting-host=212.242.197.46; posting-account=N1YbiAkAAACg7sVjhGDTDTBashE-IRQ2 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:169403 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:64637 Archived-At: On May 22, 5:49=A0pm, bojohan+n...@dd.chalmers.se (Johan Bockg=E5rd) wrote: > Peter Monsson writes: > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (regexp =A0. "\\(?:in\\|out= \\)put\\(?:\\(\\s-+\\)\\ > > (?:\\[.*\\]\\(\\s-+\\)\\)?\\)") > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (group . (1 . (2 . ( 3 . 4)= ))) > > =A0 (regexp . "\\<\\(?:in\\|out\\)put\\(\\s-+\\)\\(?:\\[.*]\\)?\\(\\s-*\\= )") > =A0 (group =A0. (1 2)) Ahh, now I get it. The wrong type argument: integer-or-marker-p error comes when the second group doesn't even exist. In your solution the second group always exists as it can match the empty string and align that. Thank you, Johan, for your help and also thanks to Scott for some inspiration on new stuff to add to the align rules. Best Regards Peter