Function: c-search-uplist-for-classkey

c-search-uplist-for-classkey is a byte-compiled function defined in cc-engine.el.gz.

Signature

(c-search-uplist-for-classkey PAREN-STATE)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-engine.el.gz
(defun c-search-uplist-for-classkey (paren-state)
  ;; Check if the closest containing paren sexp is a declaration
  ;; block, returning a 2 element vector in that case.  Aref 0
  ;; contains the bufpos at boi of the class key line, and aref 1
  ;; contains the bufpos of the open brace.  This function is an
  ;; obsolete wrapper for `c-looking-at-decl-block'.
  ;;
  ;; This function might do hidden buffer changes.
  (let ((open-paren-pos (c-most-enclosing-brace paren-state)))
    (when open-paren-pos
      (save-excursion
	(goto-char open-paren-pos)
	(when (and (eq (char-after) ?{)
		   (c-looking-at-decl-block nil))
	  (back-to-indentation)
	  (vector (point) open-paren-pos))))))