[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110845: * lisp/progmodes/ruby-mod
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110845: * lisp/progmodes/ruby-mode.el (ruby-move-to-block): When moving |
Date: |
Mon, 12 Nov 2012 05:11:06 +0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110845
fixes bug: http://debbugs.gnu.org/12851
committer: Dmitry Gutov <address@hidden>
branch nick: emacs-24
timestamp: Mon 2012-11-12 05:11:06 +0400
message:
* lisp/progmodes/ruby-mode.el (ruby-move-to-block): When moving
backward, always stop at indentation. Reverts the change from
109576.
modified:
lisp/ChangeLog
lisp/progmodes/ruby-mode.el
test/automated/ruby-mode-tests.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-11-11 02:22:26 +0000
+++ b/lisp/ChangeLog 2012-11-12 01:11:06 +0000
@@ -1,3 +1,9 @@
+2012-11-12 Dmitry Gutov <address@hidden>
+
+ * progmodes/ruby-mode.el (ruby-move-to-block): When moving
+ backward, always stop at indentation. Reverts the change from
+ 109576 (Bug#12851).
+
2012-11-11 Glenn Morris <address@hidden>
* ibuffer.el (ibuffer-mode-map, ibuffer-mode):
=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el 2012-09-24 11:39:33 +0000
+++ b/lisp/progmodes/ruby-mode.el 2012-11-12 01:11:06 +0000
@@ -898,17 +898,7 @@
(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.
=== modified file 'test/automated/ruby-mode-tests.el'
--- a/test/automated/ruby-mode-tests.el 2012-09-18 22:10:19 +0000
+++ b/test/automated/ruby-mode-tests.el 2012-11-12 01:11:06 +0000
@@ -202,13 +202,13 @@
| 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r110845: * lisp/progmodes/ruby-mode.el (ruby-move-to-block): When moving,
Dmitry Gutov <=