Function: c-awk-extend-and-syntax-tablify-region
c-awk-extend-and-syntax-tablify-region is a byte-compiled function
defined in cc-awk.el.gz.
Signature
(c-awk-extend-and-syntax-tablify-region BEG END OLD-LEN)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-awk.el.gz
;; ACM 2002/5/25. When font-locking is invoked by a buffer change, the region
;; specified by the font-lock after-change function must be expanded to
;; include ALL of any string or regexp within the region. The simplest way to
;; do this in practice is to use the beginning/end-of-logical-line functions.
;; Don't overlook the possibility of the buffer change being the "recapturing"
;; of a previously escaped newline.
;; ACM 2008-02-05:
(defun c-awk-extend-and-syntax-tablify-region (beg end old-len)
;; Expand the region (BEG END) as needed to (c-new-BEG c-new-END) then put
;; `syntax-table' properties on this region.
;;
;; This function is called from an after-change function, BEG END and
;; OLD-LEN being the standard parameters.
;;
;; Point is undefined both before and after this function call, the buffer
;; has been widened, and match-data saved. The return value is ignored.
;;
;; It prepares the buffer for font
;; locking, hence must get called before `font-lock-after-change-function'.
;;
;; This function is the AWK value of `c-before-font-lock-functions'.
;; It does hidden buffer changes.
(c-save-buffer-state ()
(setq c-new-END (c-awk-end-of-change-region beg end old-len))
(setq c-new-BEG (c-awk-beginning-of-logical-line beg))
(goto-char c-new-BEG)
(c-awk-set-syntax-table-properties c-new-END)))