Function: c-after-change-escape-NL-in-string
c-after-change-escape-NL-in-string is a byte-compiled function defined
in cc-mode.el.gz.
Signature
(c-after-change-escape-NL-in-string BEG END OLD_LEN)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-mode.el.gz
(defun c-after-change-escape-NL-in-string (beg end _old_len)
;; If a backslash has just been inserted into a string, and this quotes an
;; existing newline, remove the string fence syntax-table text properties
;; on what has become the tail of the string.
;;
;; POINT is undefined both at entry to and exit from this function, the
;; buffer will have been widened, and match data will have been saved.
;;
;; This function is called exclusively as an after-change function via
;; `c-before-font-lock-functions'. In C++ Mode, it should come before
;; `c-after-change-unmark-raw-strings' in that lang variable.
(let (lit-start ; Don't calculate this till we have to.
lim)
(when
(and (> end beg)
(memq (char-after end) '(?\n ?\r))
(c-is-escaped end)
(progn (goto-char end)
(setq lit-start (c-literal-start)))
(memq (char-after lit-start) c-string-delims)
(or (not c-ml-string-opener-re)
(progn
(goto-char lit-start)
(not (c-ml-string-opener-at-or-around-point)))
(save-excursion
(c-beginning-of-macro))))
(goto-char (1+ end)) ; After the \
;; Search forward for EOLL.
(setq lim (c-point 'eoll))
(goto-char (1+ end))
(when (c-search-forward-char-property-with-value-on-char
'syntax-table '(15) ?\" lim)
(c-remove-string-fences end)
(c-remove-string-fences (1- (point)))))))