From: Dmitry Gutov Date: Fri, 8 Nov 2013 11:22:52 +0000 (+0200) Subject: * lisp/progmodes/ruby-mode.el (ruby-smie--indent-to-stmt): Use X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~896 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=da3b328da0db9f396bcf8dc9a5ce1653c91be17d;p=emacs.git * lisp/progmodes/ruby-mode.el (ruby-smie--indent-to-stmt): Use `smie-backward-sexp' with token argument. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b8922fdaf04..08265c8ef04 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-11-08 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-smie--indent-to-stmt): Use + `smie-backward-sexp' with token argument. + 2013-11-08 Michael Albinus * net/tramp-sh.el (tramp-set-remote-path, tramp-get-ls-command): diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index c3bafa47f70..9c733d68f2b 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -485,13 +485,8 @@ explicitly declared in magic comment." (defun ruby-smie--indent-to-stmt () (save-excursion - (let (parent) - (while (not (or (eq (car parent) t) - (equal (nth 2 parent) ";"))) - (setq parent (let (smie--parent) (smie-indent--parent))) - (when (numberp (nth 1 parent)) - (goto-char (nth 1 parent)))) - (cons 'column (smie-indent-virtual))))) + (smie-backward-sexp ";") + (cons 'column (smie-indent-virtual)))) (defun ruby-smie-rules (kind token) (pcase (cons kind token)