Function: electric-pair--unbalanced-strings-p

electric-pair--unbalanced-strings-p is a byte-compiled function defined in elec-pair.el.gz.

Signature

(electric-pair--unbalanced-strings-p CHAR)

Documentation

Return non-nil if there are unbalanced strings started by CHAR.

Source Code

;; Defined in /usr/src/emacs/lisp/elec-pair.el.gz
(defun electric-pair--unbalanced-strings-p (char)
  "Return non-nil if there are unbalanced strings started by CHAR."
  (let* ((selector-ppss (syntax-ppss))
         (relevant-ppss (save-excursion
                          (if (nth 4 selector-ppss) ; comment
                              (electric-pair--syntax-ppss
                               (progn
                                 (goto-char (nth 8 selector-ppss))
                                 (forward-comment (point-max))
                                 (skip-syntax-backward " >!")
                                 (point)))
                            (syntax-ppss
                             (funcall electric-pair-string-bound-function)))))
         (string-delim (nth 3 relevant-ppss)))
    (or (eq t string-delim)
        (eq char string-delim))))