GNU bug report logs - #16116
24.3.50; smie-indent-close aligns inner closing paren with the outer opening paren

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Thu, 12 Dec 2013 01:58:02 UTC

Severity: minor

Tags: patch

Found in version 24.3.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#16116: closed (24.3.50; smie-indent-close aligns inner
 closing paren with the outer opening paren)
Date: Tue, 17 Dec 2013 03:04:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 17 Dec 2013 05:03:42 +0200
with message-id <52AFBF0E.4000505 <at> yandex.ru>
and subject line Re: bug#16116: 24.3.50; smie-indent-close aligns inner closing paren with the outer opening paren
has caused the debbugs.gnu.org bug report #16116,
regarding 24.3.50; smie-indent-close aligns inner closing paren with the outer opening paren
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
16116: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16116
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dmitry Gutov <dgutov <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50;
 smie-indent-close aligns inner closing paren with the outer opening
 paren
Date: Thu, 12 Dec 2013 03:57:01 +0200
Try this example with ruby-mode:

foo(
  a,
  b => [
    1, 3, 4
  ],
  c => [
    5, 6
  ])

Currently, it will indent the last line to the 0th column, which doesn't
look right to me.

The following patch fixes that.  Would it be all right to install it?

=== modified file 'lisp/emacs-lisp/smie.el'
--- lisp/emacs-lisp/smie.el	2013-11-04 20:45:36 +0000
+++ lisp/emacs-lisp/smie.el	2013-12-12 01:39:59 +0000
@@ -1423,8 +1423,7 @@
   (save-excursion
     ;; (forward-comment (point-max))
     (when (looking-at "\\s)")
-      (while (not (zerop (skip-syntax-forward ")")))
-        (skip-chars-forward " \t"))
+      (forward-char 1)
       (condition-case nil
           (progn
             (backward-sexp 1)


In GNU Emacs 24.3.50.8 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.6)
 of 2013-12-09 on axl
Bzr revision: 115440 dmantipov <at> yandex.ru-20131209163052-oess75ps2o5tt61q
Windowing system distributor `The X.Org Foundation', version 11.0.11403000
System Description:	Ubuntu 13.10


[Message part 3 (message/rfc822, inline)]
From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 16116-done <at> debbugs.gnu.org, Steve Purcell <steve <at> sanityinc.com>
Subject: Re: bug#16116: 24.3.50; smie-indent-close aligns inner closing paren
 with the outer opening paren
Date: Tue, 17 Dec 2013 05:03:42 +0200
On 16.12.2013 16:23, Stefan Monnier wrote:
> I think it's OK.

Thanks for looking, applied.

> Preserving the old behavior would maybe be better, but ... let's try it
> as is.

I do believe the new behavior is a better default.

Octave, Prolog, etc, examples in test/indent seem unaffected, but there 
is one affected example in elpa/packages/sml-mode/testcases.sml (I'm 
also getting other mismatches there, but those are probably unrelated).


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

Previous Next


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