[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-cmds.el,v
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-cmds.el,v |
Date: |
Thu, 19 Apr 2007 17:35:16 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Alan Mackenzie <acmacm> 07/04/19 17:35:16
Index: cc-cmds.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cc-cmds.el,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -b -r1.59 -r1.60
--- cc-cmds.el 17 Apr 2007 20:48:43 -0000 1.59
+++ cc-cmds.el 19 Apr 2007 17:35:16 -0000 1.60
@@ -1360,10 +1360,24 @@
(and c-opt-block-decls-with-vars-key
(save-excursion
(c-syntactic-skip-backward "^;}" lim)
+ (let ((eo-block (point))
+ bod)
(and (eq (char-before) ?\})
(eq (car (c-beginning-of-decl-1 lim)) 'previous)
- (looking-at c-opt-block-decls-with-vars-key)
- (point)))))
+ (setq bod (point))
+ ;; Look for struct or union or ... If we find one, it might
+ ;; be the return type of a function, or the like. Exclude
+ ;; this case.
+ (c-syntactic-re-search-forward
+ (concat "[;=\(\[{]\\|\\("
+ c-opt-block-decls-with-vars-key
+ "\\)")
+ eo-block t t t)
+ (match-beginning 1) ; Is there a "struct" etc., somewhere?
+ (not (eq (char-before) ?_))
+ (c-syntactic-re-search-forward "[;=\(\[{]" eo-block t t t)
+ (eq (char-before) ?\{)
+ bod)))))
(defun c-where-wrt-brace-construct ()
;; Determine where we are with respect to functions (or other brace
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-cmds.el,v, Alan Mackenzie, 2007/04/07
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-cmds.el,v, Alan Mackenzie, 2007/04/08
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-cmds.el,v, Alan Mackenzie, 2007/04/09
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-cmds.el,v, Alan Mackenzie, 2007/04/17
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-cmds.el,v,
Alan Mackenzie <=
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-cmds.el,v, Alan Mackenzie, 2007/04/21
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-cmds.el,v, Richard M. Stallman, 2007/04/22