Function: c-while-widening-to-decl-block

c-while-widening-to-decl-block is a macro defined in cc-cmds.el.gz.

Signature

(c-while-widening-to-decl-block CONDITION &optional NO-WHERE)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-cmds.el.gz
(eval-and-compile
  (defmacro c-while-widening-to-decl-block (condition &optional no-where)
    ;; Repeatedly evaluate CONDITION until it returns nil.  After each
    ;; evaluation, if `c-defun-tactic' is set appropriately, widen to innards
    ;; of the next enclosing declaration block (e.g. namespace, class), or the
    ;; buffer's original restriction.
    ;;
    ;; If NO-WHERE is non-nil, don't compile in a `(setq where ....)'.
    ;;
    ;; This is a very special purpose macro, which assumes the existence of
    ;; several variables.  It is for use only in c-beginning-of-defun and
    ;; c-end-of-defun.
    (declare (debug t))
    `(while
	 (and ,condition
	      (eq c-defun-tactic 'go-outward)
	      lim)
       (setq paren-state (c-whack-state-after lim paren-state))
       (setq lim (c-widen-to-enclosing-decl-scope
		  paren-state orig-point-min orig-point-max))
       ,@(if (not no-where)
	     `((setq where 'in-block))))))