Function: lua-goto-matching-block-token

lua-goto-matching-block-token is a byte-compiled function defined in lua-mode.el.gz.

Signature

(lua-goto-matching-block-token &optional PARSE-START DIRECTION)

Documentation

Find block begin/end token matching the one at the point.

This function moves the point to the token that matches the one at the current point. Returns the point position of the first character of the matching token if successful, nil otherwise.

Optional PARSE-START is a position to which the point should be moved first.

DIRECTION has to be 'forward or 'backward ('forward by default).

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/lua-mode.el.gz
(defun lua-goto-matching-block-token (&optional parse-start direction)
  "Find block begin/end token matching the one at the point.
This function moves the point to the token that matches the one at the
current point.  Returns the point position of the first character of the
matching token if successful, nil otherwise.

Optional PARSE-START is a position to which the point should be moved
first.

DIRECTION has to be \\='forward or \\='backward (\\='forward by default)."
  (when parse-start (goto-char parse-start))
  (let ((case-fold-search nil))
    (when-let* (((looking-at lua-indentation-modifier-regexp))
                (position (lua-find-matching-token-word
                           (match-string 0) direction)))
      (goto-char position))))