diff options
| author | Dmitry Gutov | 2013-11-08 13:22:52 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2013-11-08 13:22:52 +0200 |
| commit | da3b328da0db9f396bcf8dc9a5ce1653c91be17d (patch) | |
| tree | a3e3b05165266a2fd0963723df9ebe4c97282724 | |
| parent | 8acb09ca61fdceb7b3df3456e0833b7ce657ce2b (diff) | |
| download | emacs-da3b328da0db9f396bcf8dc9a5ce1653c91be17d.tar.gz emacs-da3b328da0db9f396bcf8dc9a5ce1653c91be17d.zip | |
* lisp/progmodes/ruby-mode.el (ruby-smie--indent-to-stmt): Use
`smie-backward-sexp' with token argument.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 9 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b8922fdaf04..08265c8ef04 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-11-08 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * progmodes/ruby-mode.el (ruby-smie--indent-to-stmt): Use | ||
| 4 | `smie-backward-sexp' with token argument. | ||
| 5 | |||
| 1 | 2013-11-08 Michael Albinus <michael.albinus@gmx.de> | 6 | 2013-11-08 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 7 | ||
| 3 | * net/tramp-sh.el (tramp-set-remote-path, tramp-get-ls-command): | 8 | * 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." | |||
| 485 | 485 | ||
| 486 | (defun ruby-smie--indent-to-stmt () | 486 | (defun ruby-smie--indent-to-stmt () |
| 487 | (save-excursion | 487 | (save-excursion |
| 488 | (let (parent) | 488 | (smie-backward-sexp ";") |
| 489 | (while (not (or (eq (car parent) t) | 489 | (cons 'column (smie-indent-virtual)))) |
| 490 | (equal (nth 2 parent) ";"))) | ||
| 491 | (setq parent (let (smie--parent) (smie-indent--parent))) | ||
| 492 | (when (numberp (nth 1 parent)) | ||
| 493 | (goto-char (nth 1 parent)))) | ||
| 494 | (cons 'column (smie-indent-virtual))))) | ||
| 495 | 490 | ||
| 496 | (defun ruby-smie-rules (kind token) | 491 | (defun ruby-smie-rules (kind token) |
| 497 | (pcase (cons kind token) | 492 | (pcase (cons kind token) |