aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/cc-engine.el
diff options
context:
space:
mode:
authorMiles Bader2008-01-30 07:57:28 +0000
committerMiles Bader2008-01-30 07:57:28 +0000
commitd235ca2ff8fab139ce797757fcb159d1e28fa7e0 (patch)
tree96c5cd1a06a0d9dc26e8470c6eabfc032c0046f3 /lisp/progmodes/cc-engine.el
parent3709a060f679dba14df71ae64a0035fa2b5b3106 (diff)
parent02cbe062bee38a6705bafb1699d77e3c44cfafcf (diff)
downloademacs-d235ca2ff8fab139ce797757fcb159d1e28fa7e0.tar.gz
emacs-d235ca2ff8fab139ce797757fcb159d1e28fa7e0.zip
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-324
Diffstat (limited to 'lisp/progmodes/cc-engine.el')
-rw-r--r--lisp/progmodes/cc-engine.el27
1 files changed, 16 insertions, 11 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 7cac158166e..48bbcaf18cf 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -5094,7 +5094,8 @@ comment at the start of cc-engine.el for more info."
5094 ;; 5094 ;;
5095 ;; The point is left at the first token after the first complete 5095 ;; The point is left at the first token after the first complete
5096 ;; declarator, if there is one. The return value is a cons where 5096 ;; declarator, if there is one. The return value is a cons where
5097 ;; the car is the position of the first token in the declarator. 5097 ;; the car is the position of the first token in the declarator. (See
5098 ;; below for the cdr.)
5098 ;; Some examples: 5099 ;; Some examples:
5099 ;; 5100 ;;
5100 ;; void foo (int a, char *b) stuff ... 5101 ;; void foo (int a, char *b) stuff ...
@@ -5118,9 +5119,9 @@ comment at the start of cc-engine.el for more info."
5118 ;; Foo::Foo (int b) : Base (b) {} 5119 ;; Foo::Foo (int b) : Base (b) {}
5119 ;; car ^ ^ point 5120 ;; car ^ ^ point
5120 ;; 5121 ;;
5121 ;; The cdr of the return value is non-nil if a 5122 ;; The cdr of the return value is non-nil iff a `c-typedef-decl-kwds'
5122 ;; `c-typedef-decl-kwds' specifier is found in the declaration, 5123 ;; specifier (e.g. class, struct, enum, typedef) is found in the
5123 ;; i.e. the declared identifier(s) are types. 5124 ;; declaration, i.e. the declared identifier(s) are types.
5124 ;; 5125 ;;
5125 ;; If a cast is parsed: 5126 ;; If a cast is parsed:
5126 ;; 5127 ;;
@@ -5135,7 +5136,7 @@ comment at the start of cc-engine.el for more info."
5135 ;; the first token in (the visible part of) the buffer. 5136 ;; the first token in (the visible part of) the buffer.
5136 ;; 5137 ;;
5137 ;; CONTEXT is a symbol that describes the context at the point: 5138 ;; CONTEXT is a symbol that describes the context at the point:
5138 ;; 'decl In a comma-separatded declaration context (typically 5139 ;; 'decl In a comma-separated declaration context (typically
5139 ;; inside a function declaration arglist). 5140 ;; inside a function declaration arglist).
5140 ;; '<> In an angle bracket arglist. 5141 ;; '<> In an angle bracket arglist.
5141 ;; 'arglist Some other type of arglist. 5142 ;; 'arglist Some other type of arglist.
@@ -8032,12 +8033,15 @@ comment at the start of cc-engine.el for more info."
8032 8033
8033 ;; CASE 5A.5: ordinary defun open 8034 ;; CASE 5A.5: ordinary defun open
8034 (t 8035 (t
8035 (goto-char placeholder) 8036 (save-excursion
8036 (if (or containing-decl-open macro-start) 8037 (c-beginning-of-decl-1 lim)
8037 (c-add-syntax 'defun-open (c-point 'boi)) 8038 (while (looking-at c-specifier-key)
8038 ;; Bogus to use bol here, but it's the legacy. 8039 (goto-char (match-end 1))
8039 (c-add-syntax 'defun-open (c-point 'bol))) 8040 (c-forward-syntactic-ws indent-point))
8040 ))) 8041 (c-add-syntax 'defun-open (c-point 'boi))
8042 ;; Bogus to use bol here, but it's the legacy. (Resolved,
8043 ;; 2007-11-09)
8044 ))))
8041 8045
8042 ;; CASE 5B: After a function header but before the body (or 8046 ;; CASE 5B: After a function header but before the body (or
8043 ;; the ending semicolon if there's no body). 8047 ;; the ending semicolon if there's no body).
@@ -8296,6 +8300,7 @@ comment at the start of cc-engine.el for more info."
8296 8300
8297 ;; CASE 5H: we could be looking at subsequent knr-argdecls 8301 ;; CASE 5H: we could be looking at subsequent knr-argdecls
8298 ((and c-recognize-knr-p 8302 ((and c-recognize-knr-p
8303 (not containing-sexp) ; can't be knr inside braces.
8299 (not (eq char-before-ip ?})) 8304 (not (eq char-before-ip ?}))
8300 (save-excursion 8305 (save-excursion
8301 (setq placeholder (cdr (c-beginning-of-decl-1 lim))) 8306 (setq placeholder (cdr (c-beginning-of-decl-1 lim)))