From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Common Lisp indentation bug fix/new feature Date: Tue, 22 Nov 2011 11:43:52 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1321980242 3224 80.91.229.12 (22 Nov 2011 16:44:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Nov 2011 16:44:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 22 17:43:58 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RStRu-0006r5-61 for ged-emacs-devel@m.gmane.org; Tue, 22 Nov 2011 17:43:58 +0100 Original-Received: from localhost ([::1]:52556 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RStRt-0001IM-P3 for ged-emacs-devel@m.gmane.org; Tue, 22 Nov 2011 11:43:57 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:38304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RStRr-0001Hr-28 for emacs-devel@gnu.org; Tue, 22 Nov 2011 11:43:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RStRp-0006Wm-Pr for emacs-devel@gnu.org; Tue, 22 Nov 2011 11:43:55 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:45450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RStRp-0006Wg-HR for emacs-devel@gnu.org; Tue, 22 Nov 2011 11:43:53 -0500 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id pAMGhqSb026795; Tue, 22 Nov 2011 11:43:52 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 5120BB4043; Tue, 22 Nov 2011 11:43:52 -0500 (EST) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Tue, 22 Nov 2011 16:35:31 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4049=0 X-NAI-Spam-Version: 2.2.0.9286 : core <4049> : streams <703831> : uri <1013261> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146151 Archived-At: > I think the LOOP indentation thing really needs to have deeper knowledge > about the semantics to indent stuff better. That is, it needs to know > that FOR and COLLECT introduce a new clause, while ON/BY don't. > So I'll write something more semantically aware and apply it to Emacs > after 24.1. I'd be interested to see how SMIE handles it. I.e. something along the lines of (defvar lisp-loop-smie-grammar (smie-prec2->grammar (smie-bnf->prec2 BLABLA))) ...whileindenting... ...(if (head-is-loop) (let ((smie-grammar lisp-loop-smie-grammar) (smie-rules-function BLEBLE) (smie-forward-token-function BLIBLI) (smie-backward-token-function BLOBLO)) (smie-indent-calculate))) Stefan