[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Common Lisp indentation bug fix/new feature
From: |
Stefan Monnier |
Subject: |
Re: Common Lisp indentation bug fix/new feature |
Date: |
Tue, 22 Nov 2011 11:43:52 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) |
> 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