(c-go-list-forward))
(when (equal (c-get-char-property (1- (point)) 'syntax-table)
c->-as-paren-syntax) ; should always be true.
- (c-unmark-<->-as-paren (1- (point))))
- (c-unmark-<->-as-paren pos))))
+ (c-unmark-<->-as-paren (1- (point)))
+ (c-truncate-lit-pos-cache (1- (point))))
+ (c-unmark-<->-as-paren pos)
+ (c-truncate-lit-pos-cache pos))))
(defun c-clear->-pair-props (&optional pos)
;; POS (default point) is at a > character. If it is marked with
(c-go-up-list-backward))
(when (equal (c-get-char-property (point) 'syntax-table)
c-<-as-paren-syntax) ; should always be true.
- (c-unmark-<->-as-paren (point)))
- (c-unmark-<->-as-paren pos))))
+ (c-unmark-<->-as-paren (point))
+ (c-truncate-lit-pos-cache (point)))
+ (c-unmark-<->-as-paren pos)
+ (c-truncate-lit-pos-cache pos))))
(defun c-clear-<>-pair-props (&optional pos)
;; POS (default point) is at a < or > character. If it has an
(equal (c-get-char-property (1- (point)) 'syntax-table)
c->-as-paren-syntax)) ; should always be true.
(c-unmark-<->-as-paren (1- (point)))
- (c-unmark-<->-as-paren pos))
+ (c-unmark-<->-as-paren pos)
+ (c-truncate-lit-pos-cache pos))
t)))
(defun c-clear->-pair-props-if-match-before (lim &optional pos)
(equal (c-get-char-property (point) 'syntax-table)
c-<-as-paren-syntax)) ; should always be true.
(c-unmark-<->-as-paren (point))
+ (c-truncate-lit-pos-cache (point))
(c-unmark-<->-as-paren pos))
t)))
;; bracket arglist. It's propagated through the return value
;; on successful completion.
(c-record-found-types c-record-found-types)
+ (syntax-table-prop-on-< (c-get-char-property (point) 'syntax-table))
;; List that collects the positions after the argument
;; separating ',' in the arglist.
arg-start-pos)
;; If the '<' has paren open syntax then we've marked it as an angle
;; bracket arglist before, so skip to the end.
(if (and (not c-parse-and-markup-<>-arglists)
- (c-get-char-property (point) 'syntax-table))
+ syntax-table-prop-on-<)
(progn
(forward-char)
(c-put-c-type-property (1- (car arg-start-pos))
'c-<>-arg-sep)
(setq arg-start-pos (cdr arg-start-pos)))
+ (when (and (not syntax-table-prop-on-<)
+ (c-get-char-property (1- (point))
+ 'syntax-table))
+ ;; Clear the now spuriously matching < of its
+ ;; syntax-table property. This could happen on
+ ;; inserting "_cast" into "static <" with C-y.
+ (save-excursion
+ (and (c-go-list-backward)
+ (eq (char-after) ?<)
+ (c-truncate-lit-pos-cache (point))
+ (c-unmark-<->-as-paren (point)))))
(c-mark-<-as-paren start)
- (c-mark->-as-paren (1- (point))))
+ (c-mark->-as-paren (1- (point)))
+ (c-truncate-lit-pos-cache start))
(setq res t)
nil)) ; Exit the loop.