Function: c-get-cache-scan-pos

c-get-cache-scan-pos is a byte-compiled function defined in cc-engine.el.gz.

Signature

(c-get-cache-scan-pos HERE)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-engine.el.gz
(defun c-get-cache-scan-pos (here)
  ;; From the state-cache, determine the buffer position from which we might
  ;; scan forward to HERE to update this cache.  This position will be just
  ;; after a paren/brace/bracket recorded in the cache, if possible, otherwise
  ;; return the earliest position in the accessible region which isn't within
  ;; a literal.  If the visible portion of the buffer is entirely within a
  ;; literal, return NIL.
  (let ((c c-state-cache) elt)
    ;(while (>= (or (c-state-cache-top-lparen c) 1) here)
    (while (and c
		(>= (c-state-cache-top-lparen c) here))
      (setq c (cdr c)))

    (setq elt (car c))
    (cond
     ((consp elt)
      (if (> (cdr elt) here)
	  (1+ (car elt))
	(cdr elt)))
     (elt (1+ elt))
     ((<= (c-state-get-min-scan-pos) here)
      (c-state-get-min-scan-pos))
     (t nil))))