branch: elpa/lua-mode
commit 85d01e90b60fe6d7409d8780e8bd21bf4e547877
Author: Nikita Bloshchanevich <[email protected]>
Commit: Nikita Bloshchanevich <[email protected]>
`lua-funcname-at-point': fix regexes
Handle _ in identifiers and escape ".".
---
lua-mode.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lua-mode.el b/lua-mode.el
index 4656016..4735b91 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -2022,11 +2022,11 @@ Create a Lua process if one doesn't already exist."
"Get current Name { '.' Name } sequence."
(save-excursion
(save-match-data
- (re-search-backward "\\`\\|[^A-Za-z.]")
+ (re-search-backward "\\`\\|[^A-Za-z_.]")
;; NOTE: `point' will be either at the start of the buffer or on a
;; non-symbol character.
- (re-search-forward "\\([A-Za-z]+\\(?:.[A-Za-z]+\\)*\\)")
- (match-string 1))))
+ (re-search-forward "\\([A-Za-z_]+\\(?:\\.[A-Za-z_]+\\)*\\)")
+ (match-string-no-properties 1))))
(defun lua-search-documentation ()
"Search Lua documentation for the word at the point."