Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
10074:309352e06d3a | 10075:bf0eb7f0717b |
---|---|
716 ;; paren if we have | 716 ;; paren if we have |
717 ;; int foo Proto ((int, int)); | 717 ;; int foo Proto ((int, int)); |
718 (looking-at "[^\"\n=(]*(") | 718 (looking-at "[^\"\n=(]*(") |
719 (progn | 719 (progn |
720 (goto-char (1- (match-end 0))) | 720 (goto-char (1- (match-end 0))) |
721 (setq lim (point)) | 721 ;; Skip any number of paren-groups. |
722 (condition-case nil | 722 ;; Consider typedef int (*fcn) (int); |
723 (forward-sexp 1) | 723 (while (= (following-char) ?\() |
724 (error)) | 724 (setq lim (point)) |
725 (skip-chars-forward " \t\f") | 725 (condition-case nil |
726 (forward-sexp 1) | |
727 (error)) | |
728 (skip-chars-forward " \t\f")) | |
729 ;; Have we reached something | |
730 ;; that shows this isn't a function | |
731 ;; definition? | |
726 (and (< (point) indent-point) | 732 (and (< (point) indent-point) |
727 (not (memq (following-char) | 733 (not (memq (following-char) |
728 '(?\, ?\;))))) | 734 '(?\, ?\;))))) |
729 ;; Make sure the "function decl" we found | 735 ;; Make sure the "function decl" we found |
730 ;; is not inside a comment. | 736 ;; is not inside a comment. |