aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2022-12-17 03:13:29 +0200
committerDmitry Gutov2022-12-17 03:31:11 +0200
commit3356c0cb16359aa56d1db8446cff07f16519086d (patch)
tree5c290131ab62a8fabc341c9703fd1ca7df791338
parentd9add661617dfba491465943d402230699a9a4ff (diff)
downloademacs-3356c0cb16359aa56d1db8446cff07f16519086d.tar.gz
emacs-3356c0cb16359aa56d1db8446cff07f16519086d.zip
Fix end-of-defun in ruby-mode
* lisp/progmodes/ruby-mode.el (ruby-beginning-of-defun): Return t in case of success.
-rw-r--r--lisp/progmodes/ruby-mode.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 4ac289d529f..9a557484b58 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1375,9 +1375,10 @@ With ARG, move backward multiple defuns. Negative ARG means
1375move forward." 1375move forward."
1376 (interactive "p") 1376 (interactive "p")
1377 (let (case-fold-search) 1377 (let (case-fold-search)
1378 (and (re-search-backward (concat "^\\s *" ruby-defun-beg-re "\\_>") 1378 (when (re-search-backward (concat "^\\s *" ruby-defun-beg-re "\\_>")
1379 nil t (or arg 1)) 1379 nil t (or arg 1))
1380 (beginning-of-line)))) 1380 (beginning-of-line)
1381 t)))
1381 1382
1382(defun ruby-end-of-defun () 1383(defun ruby-end-of-defun ()
1383 "Move point to the end of the current defun. 1384 "Move point to the end of the current defun.