GNU bug report logs - #15594
24.3; Indentation of method arguments without parentheses in ruby-mode is broken

Previous Next

Package: emacs;

Reported by: Bozhidar Batsov <bozhidar.batsov <at> gmail.com>

Date: Sat, 12 Oct 2013 06:26:02 UTC

Severity: normal

Found in version 24.3

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


Message #34 received at 15594 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 15594 <at> debbugs.gnu.org
Subject: Re: trunk r114639: * lisp/progmodes/ruby-mode.el (ruby-smie-grammar):
 Add rule for paren-free
Date: Mon, 21 Oct 2013 09:25:07 -0400
>> Calling ruby-smie--forward-token is a bit dangerous since that function
>> might itself be called from ruby-smie--forward-token.  It might work,
>> but you'll have to think hard about why an inf-loop is not possible.
> Hopefully because both `ruby-smie--forward-token' and
> ruby-smie--backward-token' would only call `ruby-smie--forward-token', and
> only when (> pos (point)), IOW there has to be some whitespace skipping done
> between the recursive calls.

Only recursing in one direction (only forward or only backward) is
a good way to guarantee progress, indeed.  But currently
ruby-smie--implicit-semi-p calls ruby-smie--backward-token, so beware.


        Stefan




This bug report was last modified 11 years and 208 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.