backward, always stop at indentation. Reverts the change from
2012-08-12T22:06:56Z!monnier@iro.umontreal.ca.
Fixes: debbugs:12851
+2012-11-12 Dmitry Gutov <dgutov@yandex.ru>
+
+ * progmodes/ruby-mode.el (ruby-move-to-block): When moving
+ backward, always stop at indentation. Reverts the change from
+ 2012-08-12T22:06:56Z!monnier@iro.umontreal.ca (Bug#12851).
+
2012-11-11 Glenn Morris <rgm@gnu.org>
* ibuffer.el (ibuffer-mode-map, ibuffer-mode):
(back-to-indentation)
(if (looking-at (concat "\\<\\(" ruby-block-mid-re "\\)\\>"))
(setq done nil)))))
- (back-to-indentation)
- (when (< n 0)
- (let ((eol (point-at-eol)) state next)
- (if (< orig eol) (setq eol orig))
- (setq orig (point))
- (while (and (setq next (apply 'ruby-parse-partial eol state))
- (< (point) eol))
- (setq state next))
- (when (cdaadr state)
- (goto-char (cdaadr state)))
- (backward-word)))))
+ (back-to-indentation)))
(defun ruby-beginning-of-block (&optional arg)
"Move backward to the beginning of the current block.
| end
|"))
-(ert-deftest ruby-move-to-block-stops-at-opening ()
+(ert-deftest ruby-move-to-block-stops-at-indentation ()
(with-temp-buffer
(insert "def f\nend")
(beginning-of-line)
(ruby-mode)
(ruby-move-to-block -1)
- (should (looking-at "f$"))))
+ (should (looking-at "^def"))))
(ert-deftest ruby-toggle-block-to-do-end ()
(with-temp-buffer