Function: electric-pair-analyze-conversion
electric-pair-analyze-conversion is a byte-compiled function defined
in elec-pair.el.gz.
Signature
(electric-pair-analyze-conversion STRING)
Documentation
Delete delimiters enclosing the STRING deleted by an input method.
If the last character of STRING is an electric pair character,
and the character after point is too, then delete that other
character. Called by analyze-text-conversion.
Source Code
;; Defined in /usr/src/emacs/lisp/elec-pair.el.gz
(defun electric-pair-analyze-conversion (string)
"Delete delimiters enclosing the STRING deleted by an input method.
If the last character of STRING is an electric pair character,
and the character after point is too, then delete that other
character. Called by `analyze-text-conversion'."
(let* ((prev (aref string (1- (length string))))
(next (char-after))
(syntax-info (electric-pair-syntax-info prev))
(syntax (car syntax-info))
(pair (cadr syntax-info)))
(when (and next pair (memq syntax '(?\( ?\" ?\$))
(eq pair next))
(delete-char 1))))