In c-\(go-\)?-\(up-\|down-\)?list-\(forward\|backward\) check limit isn't nil
Check the limit both at macro expansion time (for a hard coded nil) and at run time in the generated code. Tidy up these macros generally. * lisp/progmodes/cc-defs.el (c-safe-scan-lists): Check `limit' is present and not identically nil before generating a narrow-to-region call. Generate code to check `limit' is not nil at run time. (c-go-list-forward, c-go-list-backward): Remove the generation of redundant narrow-to-region, instead calling c-safe-scan-lists directly. (c-go-up-list-forward, c-go-up-list-backward, c-go-down-list-forward) (c-go-down-list-backward): Invoke the corresponding macros without the "go-" to determine the destination position instead of generating a redundant narrow-to-region.
Showing with 21 additions and 47 deletions