changeset 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 309352e06d3a
children a7308fb078c9
files lisp/progmodes/c-mode.el
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
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)
 						       '(?\, ?\;)))))