emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 3356c0cb16 1/2: Fix end-of-defun in ruby-mode


From: Dmitry Gutov
Subject: emacs-29 3356c0cb16 1/2: Fix end-of-defun in ruby-mode
Date: Fri, 16 Dec 2022 20:31:29 -0500 (EST)

branch: emacs-29
commit 3356c0cb16359aa56d1db8446cff07f16519086d
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    Fix end-of-defun in ruby-mode
    
    * lisp/progmodes/ruby-mode.el (ruby-beginning-of-defun):
    Return t in case of success.
---
 lisp/progmodes/ruby-mode.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 4ac289d529..9a557484b5 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]