]> git.eshelyaron.com Git - emacs.git/commit
Fix c-declaration-limits to return correct limits in all cases.
authorAlan Mackenzie <acm@muc.de>
Thu, 1 Sep 2016 18:06:22 +0000 (18:06 +0000)
committerAlan Mackenzie <acm@muc.de>
Thu, 1 Sep 2016 18:12:43 +0000 (18:12 +0000)
commitdda2d6a311fd2a7096176e240e4e81b423eaa8e2
tree6c7f43e3058c8642f8c51a9ef1ad5d0f95207a75
parent0c94b847082bf915137c4270b8009ad599681ccf
Fix c-declaration-limits to return correct limits in all cases.

This function is the guts of c-indent-defun and c-mark-function.

In particular, when c-defun-tactic is nil, return a correct value rather than
always nil, and when it's 'go-outward, go through an intricate algorithm to
determine the requisite narrowing before the "top-level" defuns go to work.

* lisp/progmodes/cc-cmds.el (c-narrow-to-most-enclosing-decl-block): Enhance
to take additional optional parameter LEVEL, saying how many enclosing levels
of decl-block to narrow to.
(c-declaration-limits): Introduce algorithm to determine narrowing.  Use
c-where-wrt-to-brace-block to determine whether to go back to BOD to determine
lower bound.
lisp/progmodes/cc-cmds.el