From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bolega Newsgroups: gmane.emacs.help Subject: Re: How to structure looking-at with error conditions Date: Wed, 24 Nov 2010 09:44:22 -0800 (PST) Organization: http://groups.google.com Message-ID: <1c1892e2-2556-407f-b7c4-b81e895ca5c5@j18g2000yqd.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1291897374 28782 80.91.229.12 (9 Dec 2010 12:22:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 12:22:54 +0000 (UTC) Cc: bolega To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 13:22:49 2010 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.69) (envelope-from ) id 1PQfWL-0005NZ-4p for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 13:22:49 +0100 Original-Received: from localhost ([127.0.0.1]:46495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQfWJ-0006nw-Uz for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 07:22:48 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!j18g2000yqd.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-NNTP-Posting-Host: 75.28.131.54 Original-X-Trace: posting.google.com 1290620663 10627 127.0.0.1 (24 Nov 2010 17:44:23 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 24 Nov 2010 17:44:23 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j18g2000yqd.googlegroups.com; posting-host=75.28.131.54; posting-account=REkl4woAAABFXaU7nL79XtGpnmNCQ415 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; {83B3ACED-AC9F-2058-FD69-DBCDCD722B97}; (R1 1.5)),gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:182611 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:77023 Archived-At: Barry has explained quite well. when and cond have different sets of parentheses also. The bare structure is below : (when test1 action1) (cond (test1 action1) (test2 action2) (t default)) If each of the test is like this (looking-at "regexp1") then you have two adjacent parens in cond while no adjacent parens in when. Similarly, if your action is like this (setq var1 "string1") then you have to adjacent parens after "string1" Hence, the indentation is best done while keeping two adjacent parens together. (cond () () ) is more general but not the most readable unless some of these indentation rules are followed which dont occur in (when). Bolega