all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: 16116@debbugs.gnu.org
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	[thread overview]
Message-ID: <87sity96he.fsf@yandex.ru> (raw)

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	other threads:[~2013-12-12  1:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-12  1:57 Dmitry Gutov [this message]
2013-12-12 12:55 ` bug#16116: 24.3.50; smie-indent-close aligns inner closing paren with the outer opening paren Stefan Monnier
2013-12-12 16:30   ` Dmitry Gutov
2013-12-14  8:23 ` Steve Purcell
2013-12-14 14:13   ` Stefan Monnier
2013-12-14 15:04     ` Dmitry Gutov
2013-12-14 15:32       ` Stefan Monnier
2013-12-14 18:25         ` Dmitry Gutov
2013-12-15  1:50           ` Stefan Monnier
2013-12-15  2:44             ` Dmitry Gutov
2013-12-15 13:00               ` Stefan Monnier
2013-12-15 23:22                 ` Dmitry Gutov
2013-12-16 14:23                   ` Stefan Monnier
2013-12-17  3:03                     ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sity96he.fsf@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=16116@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.