From: Dmitry Gutov Date: Sat, 17 Dec 2022 01:13:29 +0000 (+0200) Subject: Fix end-of-defun in ruby-mode X-Git-Tag: emacs-29.0.90~1109 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3356c0cb16359aa56d1db8446cff07f16519086d;p=emacs.git Fix end-of-defun in ruby-mode * lisp/progmodes/ruby-mode.el (ruby-beginning-of-defun): Return t in case of success. --- 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 move forward." (interactive "p") (let (case-fold-search) - (and (re-search-backward (concat "^\\s *" ruby-defun-beg-re "\\_>") - nil t (or arg 1)) - (beginning-of-line)))) + (when (re-search-backward (concat "^\\s *" ruby-defun-beg-re "\\_>") + nil t (or arg 1)) + (beginning-of-line) + t))) (defun ruby-end-of-defun () "Move point to the end of the current defun.