]> git.eshelyaron.com Git - emacs.git/commitdiff
(ruby-add-log-current-method): Recognize methods ending with ? or !
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 11 Mar 2019 00:30:08 +0000 (02:30 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 11 Mar 2019 00:30:58 +0000 (02:30 +0200)
* lisp/progmodes/ruby-mode.el (ruby-add-log-current-method):
Recognize method names ending with ? or !.

lisp/progmodes/ruby-mode.el

index e575d6cc16cd97c3fbc4bb3e57747b85c8d62805..707875d130d26485493af999d71c927401e92593 100644 (file)
@@ -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\\)")))