Function: show-paren--snap

show-paren--snap is a byte-compiled function defined in paren.el.gz.

Signature

(show-paren--snap POS)

Documentation

Return the first position at or after POS that is not mid-string/comment.

Source Code

;; Defined in /usr/src/emacs/lisp/paren.el.gz
(defun show-paren--snap (pos)
  "Return the first position at or after POS that is not mid-string/comment."
  (save-excursion
    (let ((ppss (syntax-ppss pos)))
      (if (not (or (nth 3 ppss) (nth 4 ppss)))
          pos
        (condition-case nil
            (progn (parse-partial-sexp pos (point-max) nil nil
                                       ppss 'syntax-table)
                   (point))
          (error pos))))))