Function: c-get-fallback-scan-pos
c-get-fallback-scan-pos is a byte-compiled function defined in
cc-engine.el.gz.
Signature
(c-get-fallback-scan-pos HERE)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-engine.el.gz
;; These are the limits of the macro containing point at the previous call of
;; `c-parse-state', or nil.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Defuns which analyze the buffer, yet don't change `c-state-cache'.
(defun c-get-fallback-scan-pos (here)
;; Return a start position for building `c-state-cache' from scratch. This
;; will be at the top level, 2 defuns back. Return nil if we don't find
;; these defun starts a reasonable way back.
(save-excursion
(save-restriction
(when (> here (* 10 c-state-cache-too-far))
(narrow-to-region (- here (* 10 c-state-cache-too-far)) here))
;; Go back 2 bods, but ignore any bogus positions returned by
;; beginning-of-defun (i.e. open paren in column zero).
(goto-char here)
(let ((cnt 2))
(while (not (or (bobp) (zerop cnt)))
(c-beginning-of-defun-1) ; Pure elisp BOD.
(if (eq (char-after) ?\{)
(setq cnt (1- cnt)))))
(and (not (bobp))
(point)))))