bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16116: 24.3.50; smie-indent-close aligns inner closing paren with th


From: Dmitry Gutov
Subject: bug#16116: 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@yandex.ru-20131209163052-oess75ps2o5tt61q
Windowing system distributor `The X.Org Foundation', version 11.0.11403000
System Description:     Ubuntu 13.10





reply via email to

[Prev in Thread] Current Thread [Next in Thread]