Function: c-clear-<-pair-props-if-match-after

c-clear-<-pair-props-if-match-after is a byte-compiled function defined in cc-engine.el.gz.

Signature

(c-clear-<-pair-props-if-match-after LIM &optional POS)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-engine.el.gz
(defun c-clear-<-pair-props-if-match-after (lim &optional pos)
  ;; POS (default point) is at a < character.  If it is both marked
  ;; with open/close paren syntax-table property, and has a matching >
  ;; (also marked) which is after LIM, remove the property both from
  ;; the current > and its partner.  Return the position after the >
  ;; when this happens, nil when it doesn't.
  (save-excursion
    (if pos
	(goto-char pos)
      (setq pos (point)))
    (when (equal (c-get-char-property (point) 'syntax-table)
		 c-<-as-paren-syntax)
      (with-syntax-table c-no-parens-syntax-table ; ignore unbalanced [,{,(,..
	(c-go-list-forward))
      (when (and (>= (point) lim)
		 (equal (c-get-char-property (1- (point)) 'syntax-table)
			c->-as-paren-syntax)) ; should always be true.
	(c-unmark-<-or->-as-paren (1- (point)))
	(c-unmark-<-or->-as-paren pos)
	(c-truncate-lit-pos/state-cache pos)
	(point)))))