Mercurial > emacs
diff lisp/progmodes/c-mode.el @ 10075:bf0eb7f0717b
(calculate-c-indent): Handle a top-level decl with multiple paren groups.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 28 Nov 1994 16:53:54 +0000 |
parents | 3a54cf77d5e1 |
children | b80150d748d1 |
line wrap: on
line diff
--- a/lisp/progmodes/c-mode.el Mon Nov 28 13:55:57 1994 +0000 +++ b/lisp/progmodes/c-mode.el Mon Nov 28 16:53:54 1994 +0000 @@ -718,11 +718,17 @@ (looking-at "[^\"\n=(]*(") (progn (goto-char (1- (match-end 0))) - (setq lim (point)) - (condition-case nil - (forward-sexp 1) - (error)) - (skip-chars-forward " \t\f") + ;; Skip any number of paren-groups. + ;; Consider typedef int (*fcn) (int); + (while (= (following-char) ?\() + (setq lim (point)) + (condition-case nil + (forward-sexp 1) + (error)) + (skip-chars-forward " \t\f")) + ;; Have we reached something + ;; that shows this isn't a function + ;; definition? (and (< (point) indent-point) (not (memq (following-char) '(?\, ?\;)))))