Function: c-declaration-limits
c-declaration-limits is a byte-compiled function defined in
cc-cmds.el.gz.
Signature
(c-declaration-limits NEAR)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-cmds.el.gz
(defun c-declaration-limits (near)
;; Return a cons of the beginning and end positions of the current
;; top level declaration or macro. If point is not inside any then
;; nil is returned, unless NEAR is non-nil in which case the closest
;; following one is chosen instead (if there is any). The end
;; position is at the next line, providing there is one before the
;; declaration.
;;
;; This function might do hidden buffer changes.
(save-restriction
;; Narrow enclosing brace blocks out, as required by the values of
;; `c-defun-tactic', `near', and the position of point.
(when (eq c-defun-tactic 'go-outward)
(let ((bounds
(save-restriction
(if (and (not (save-excursion (c-beginning-of-macro)))
(save-restriction
(c-narrow-to-most-enclosing-decl-block)
(memq (c-where-wrt-brace-construct)
'(at-function-end outwith-function)))
(not near))
(c-narrow-to-most-enclosing-decl-block nil 2)
(c-narrow-to-most-enclosing-decl-block))
(cons (point-min) (point-max)))))
(narrow-to-region (car bounds) (cdr bounds))))
(c-declaration-limits-1 near)))