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 /lisp/progmodes/ruby-mode.el | |
| 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.
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 9 |
1 files changed, 2 insertions, 7 deletions
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) |