Function: lua-forward-sexp
lua-forward-sexp is an interactive and byte-compiled function defined
in lua-mode.el.gz.
Signature
(lua-forward-sexp &optional COUNT)
Documentation
Forward to block end.
A positive integer argument COUNT means to forward that many times.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/lua-mode.el.gz
(defun lua-forward-sexp (&optional count)
"Forward to block end.
A positive integer argument COUNT means to forward that many times."
(interactive "p")
(unless (or (not count) (>= count 0))
(error "Negative offsets not supported"))
(save-match-data
(let ((count (or count 1))
(block-start (mapcar 'car lua-sexp-alist)))
(while (> count 0)
;; Skip whitespace
(skip-chars-forward " \t\n")
(if (looking-at (regexp-opt block-start 'words))
(let ((keyword (match-string 1)))
(lua-find-matching-token-word keyword 'forward))
;; If the current keyword is not a "begin" keyword, then just
;; perform the normal forward-sexp.
(forward-sexp 1))
(setq count (1- count))))))