Function: c-invalidate-sws-region-after-ins

c-invalidate-sws-region-after-ins is a byte-compiled function defined in cc-engine.el.gz.

Signature

(c-invalidate-sws-region-after-ins END)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-engine.el.gz
(defun c-invalidate-sws-region-after-ins (end)
  ;; Text has been inserted, ending at buffer position END.  Should there be a
  ;; literal or CPP construct open at END, check whether there are `c-in-sws'
  ;; or `c-is-sws' text properties inside this literal.  If there are, return
  ;; the buffer position of the end of the literal, else return nil.
  (save-excursion
    (goto-char end)
    (let* ((limits (c-literal-limits))
	   (lit-type (c-literal-type limits)))
      (when (and (not (memq lit-type '(c c++)))
		 (c-beginning-of-macro))
	(setq lit-type 'pound
	      limits (cons (point)
			   (progn (c-end-of-macro) (point)))))
      (when (memq lit-type '(c c++ pound))
	(let ((next-in (next-single-property-change (car limits) 'c-in-sws
						    nil (cdr limits)))
	      (next-is (next-single-property-change (car limits) 'c-is-sws
						    nil (cdr limits))))
	  (and (or next-in next-is)
	       (cdr limits)))))))