Function: c-state-cache-top-lparen

c-state-cache-top-lparen is a macro defined in cc-engine.el.gz.

Signature

(c-state-cache-top-lparen &optional CACHE)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-engine.el.gz
;; Used only in `c-append-lower-brace-pair-to-state-cache'.  It is set when
;; that defun has searched backwards for a brace pair and not found one.  Its
;; value is either nil or a cons (PA . FROM), where PA is the position of the
;; enclosing opening paren/brace/bracket which bounds the backwards search (or
;; nil when at top level) and FROM is where the backward search started.  It
;; is reset to nil in `c-invalidate-state-cache'.


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Lowish level functions/macros which work directly on `c-state-cache', or a
;; list of like structure.
(defmacro c-state-cache-top-lparen (&optional cache)
  ;; Return the address of the top left brace/bracket/paren recorded in CACHE
  ;; (default `c-state-cache') (or nil).
  (declare (debug t))
  (let ((cash (or cache 'c-state-cache)))
    `(if (consp (car ,cash))
	 (caar ,cash)
       (car ,cash))))