[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 66943d0 2/2: (ruby-add-log-current-method): Recogni
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] master 66943d0 2/2: (ruby-add-log-current-method): Recognize methods ending with ? or ! |
Date: |
Sun, 10 Mar 2019 20:31:14 -0400 (EDT) |
branch: master
commit 66943d0c9cbb0cca33e1fc88a09af14b6abf45dd
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
(ruby-add-log-current-method): Recognize methods ending with ? or !
* lisp/progmodes/ruby-mode.el (ruby-add-log-current-method):
Recognize method names ending with ? or !.
---
lisp/progmodes/ruby-mode.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index e575d6c..707875d 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1614,7 +1614,7 @@ See `add-log-current-defun-function'."
(concat "^[ \t]*" re "[ \t]+"
"\\("
;; \\. and :: for class methods
- "\\([A-Za-z_]" ruby-symbol-re "*\\|\\.\\|::" "\\)"
+ "\\([A-Za-z_]" ruby-symbol-re "*[?!]?\\|\\.\\|::"
"\\)"
"+\\)")))
(definition-re (funcall make-definition-re ruby-defun-beg-re))
(module-re (funcall make-definition-re "\\(class\\|module\\)")))