Function: c-depropertize-ml-strings-in-region
c-depropertize-ml-strings-in-region is a byte-compiled function
defined in cc-engine.el.gz.
Signature
(c-depropertize-ml-strings-in-region START FINISH)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-engine.el.gz
(defun c-depropertize-ml-strings-in-region (start finish)
;; Remove any `syntax-table' text properties associated with multi-line
;; strings contained in the region (START FINISH). Point is undefined at
;; entry and exit, and the return value has no significance.
(setq c-neutralize-pos nil)
(goto-char start)
(while (and (< (point) finish)
(re-search-forward
c-ml-string-cpp-or-opener-re
finish t))
(if (match-beginning (+ c-cpp-or-ml-match-offset 1)) ; opening delimiter
;; We've found a raw string
(let ((open-delim
(cons (match-beginning (+ c-cpp-or-ml-match-offset 1))
(cons (match-end (+ c-cpp-or-ml-match-offset 1))
(match-beginning (+ c-cpp-or-ml-match-offset 2))))))
(c-depropertize-ml-string
(cons open-delim
(when
(and
(re-search-forward
(funcall c-make-ml-string-closer-re-function
(match-string-no-properties
(+ c-cpp-or-ml-match-offset 1)))
(min (+ finish c-ml-string-max-closer-len-no-leader)
(point-max))
t)
(<= (match-end 1) finish))
(cons (match-beginning 1)
(cons (match-end 1) (match-beginning 2)))))
nil)) ; bound
;; We've found a CPP construct. Search for raw strings within it.
(goto-char (match-beginning 2)) ; the "#"
(c-end-of-macro)
(let ((eom (point)))
(goto-char (match-end 2)) ; after the "#".
(while (and (< (point) eom)
(c-syntactic-re-search-forward
c-ml-string-opener-re eom t))
(save-excursion
(let ((open-delim (cons (match-beginning 1)
(cons (match-end 1)
(match-beginning 2)))))
(c-depropertize-ml-string
(cons open-delim
(when (re-search-forward
(funcall c-make-ml-string-closer-re-function
(match-string-no-properties 1))
eom t)
(cons (match-beginning 1)
(cons (match-end 1) (match-beginning 2)))))
eom))))))) ; bound.
(when c-neutralize-pos
(if c-neutralized-prop
(c-put-syntax-table-trim-caches c-neutralize-pos c-neutralized-prop)
(c-clear-syntax-table-trim-caches c-neutralize-pos))))