summaryrefslogtreecommitdiff
path: root/.emacs.d/lisp/lua-mode.el
diff options
context:
space:
mode:
authorSimeon Simeonov2019-03-20 13:01:59 +0100
committerSimeon Simeonov2019-03-20 13:01:59 +0100
commit0cd309588c53d58f9b6ce3ebcfed1e72710f73b3 (patch)
treecadd883bd2b891b3af912013ed23009a9cfffb2a /.emacs.d/lisp/lua-mode.el
parent8d4b6e4a5dbd7ce8bbe3f8b545bff0c2d888df64 (diff)
Update .emacs.d/lisp/lua-mode.el and .emacs.d/lisp/php-mode.el
Diffstat (limited to '.emacs.d/lisp/lua-mode.el')
-rw-r--r--.emacs.d/lisp/lua-mode.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/.emacs.d/lisp/lua-mode.el b/.emacs.d/lisp/lua-mode.el
index 91fd0a4..af94a13 100644
--- a/.emacs.d/lisp/lua-mode.el
+++ b/.emacs.d/lisp/lua-mode.el
@@ -1022,6 +1022,15 @@ TOKEN-TYPE determines where the token occurs on a statement. open indicates that
1022 (lua-find-regexp 'backward lua-block-regexp)) 1022 (lua-find-regexp 'backward lua-block-regexp))
1023 1023
1024(defun lua-find-matching-token-word (token &optional direction) 1024(defun lua-find-matching-token-word (token &optional direction)
1025 "Find matching open- or close-token for TOKEN in DIRECTION.
1026Point has to be exactly at the beginning of TOKEN, e.g. with | being point
1027
1028 {{ }|} -- (lua-find-matching-token-word \"}\" 'backward) will return
1029 -- the first {
1030 {{ |}} -- (lua-find-matching-token-word \"}\" 'backward) will find
1031 -- the second {.
1032
1033DIRECTION has to be either 'forward or 'backward."
1025 (let* ((token-info (lua-get-block-token-info token)) 1034 (let* ((token-info (lua-get-block-token-info token))
1026 (match-type (lua-get-token-type token-info)) 1035 (match-type (lua-get-token-type token-info))
1027 ;; If we are on a middle token, go backwards. If it is a middle or open, 1036 ;; If we are on a middle token, go backwards. If it is a middle or open,