diff options
| author | Dmitry Gutov | 2012-09-07 08:36:20 +0400 |
|---|---|---|
| committer | Dmitry Gutov | 2012-09-07 08:36:20 +0400 |
| commit | d81ceaaf7e3d85dc31a67b4b40a557b56901cde8 (patch) | |
| tree | 102830e1d9cb00dfea4ab522536ca2e3c4b6f4b7 | |
| parent | 0ba2d4b6465b0b66d34e6ef47c151bd5920fbe54 (diff) | |
| download | emacs-d81ceaaf7e3d85dc31a67b4b40a557b56901cde8.tar.gz emacs-d81ceaaf7e3d85dc31a67b4b40a557b56901cde8.zip | |
* lisp/progmodes/ruby-mode.el (ruby-end-of-defun)
(ruby-beginning-of-defun): Simplify, allow indentation before
block beginning and end keywords. Also, fix accidental change in the former.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2f7dac68467..5f8a6135fdc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-09-07 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * progmodes/ruby-mode.el (ruby-end-of-defun) | ||
| 4 | (ruby-beginning-of-defun): Simplify, allow indentation before | ||
| 5 | block beginning and end keywords. | ||
| 6 | |||
| 1 | 2012-09-06 Stefan Monnier <monnier@iro.umontreal.ca> | 7 | 2012-09-06 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 8 | ||
| 3 | * emacs-lisp/cl-macs.el (cl--do-arglist): Understand _ on &key args | 9 | * emacs-lisp/cl-macs.el (cl--do-arglist): Understand _ on &key args |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index bcebada5e86..e8e6b3dbaef 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -839,8 +839,8 @@ and `\\' when preceded by `?'." | |||
| 839 | With ARG, move backward multiple defuns. Negative ARG means | 839 | With ARG, move backward multiple defuns. Negative ARG means |
| 840 | move forward." | 840 | move forward." |
| 841 | (interactive "p") | 841 | (interactive "p") |
| 842 | (and (re-search-backward (concat "^\\(" ruby-block-beg-re "\\)\\b") | 842 | (and (re-search-backward (concat "^\\s *\\(" ruby-block-beg-re "\\)\\_>") |
| 843 | nil 'move (or arg 1)) | 843 | nil t (or arg 1)) |
| 844 | (beginning-of-line))) | 844 | (beginning-of-line))) |
| 845 | 845 | ||
| 846 | (defun ruby-end-of-defun (&optional arg) | 846 | (defun ruby-end-of-defun (&optional arg) |
| @@ -848,7 +848,7 @@ move forward." | |||
| 848 | With ARG, move forward multiple defuns. Negative ARG means | 848 | With ARG, move forward multiple defuns. Negative ARG means |
| 849 | move backward." | 849 | move backward." |
| 850 | (interactive "p") | 850 | (interactive "p") |
| 851 | (and (re-search-forward ruby-indent-beg-re nil 'move (or arg 1)) | 851 | (and (re-search-forward (concat "^\\s *" ruby-block-end-re) nil t (or arg 1)) |
| 852 | (beginning-of-line)) | 852 | (beginning-of-line)) |
| 853 | (forward-line 1)) | 853 | (forward-line 1)) |
| 854 | 854 | ||