Function: expreg--outside-list

expreg--outside-list is a natively compiled function defined in expreg.el.

Signature

(expreg--outside-list)

Documentation

Return a list of one region marking outside the list, or nil.

If find something, leave point at the beginning of the list.

Source Code

;; Defined in /nix/store/29cdhkmkqv2bgp3p30khhf35kkbgx1ya-emacs-packages-deps/share/emacs/site-lisp/elpa/expreg-1.4.1/expreg.el
(defun expreg--outside-list ()
  "Return a list of one region marking outside the list, or nil.
If find something, leave point at the beginning of the list."
  (let (beg end)
    (condition-case nil
        (when (> (expreg--current-depth) 0)
          (save-excursion

            ;; If point inside a list but not at the beginning of one,
            ;; move to the beginning of enclosing list.
            (when (> (expreg--current-depth) 0)
              (goto-char (expreg--start-of-list)))
            (setq beg (point))
            (forward-list)
            (setq end (point)))

          (when (and beg end)
            (goto-char beg)
            (list `(outside-list . ,(cons beg end)))))
      (scan-error nil))))