aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/cc-cmds.el
diff options
context:
space:
mode:
authorAlan Mackenzie <[email protected]>2007-01-21 19:29:51 +0000
committerAlan Mackenzie <[email protected]>2007-01-21 19:29:51 +0000
commitf325b5703c522b36ffb1edfb6efeb1b0f42d90fe (patch)
treeb40b8dc4bb4432cc400d0fa53e94d352b575c264 /lisp/progmodes/cc-cmds.el
parenta3466c23711c6cc803b47da90b0f1e3a35212dbb (diff)
Correct the handling of K&R stuff in c-where-wrt-brace-construct.
Diffstat (limited to 'lisp/progmodes/cc-cmds.el')
-rw-r--r--lisp/progmodes/cc-cmds.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 070a690b70..96924899ea 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -1383,8 +1383,7 @@ No indentation or other \"electric\" behavior is performed."
;;
;; This function might do hidden buffer changes.
(save-excursion
- (let* (pos
- kluge-start
+ (let* (kluge-start
decl-result brace-decl-p
(start (point))
(paren-state (c-parse-state))
@@ -1417,11 +1416,12 @@ No indentation or other \"electric\" behavior is performed."
(setq kluge-start (point))
(setq decl-result
(car (c-beginning-of-decl-1
+ ;; NOTE: If we're in a K&R region, this might be the start
+ ;; of a parameter declaration, not the actual function.
(and least-enclosing ; LIMIT for c-b-of-decl-1
(c-safe-position least-enclosing paren-state)))))
;; Has the declaration we've gone back to got braces?
- (setq pos (point)) ; the search limit for c-recognize-knr-p
(setq brace-decl-p
(save-excursion
(and (c-syntactic-re-search-forward "[;{]" nil t t)
@@ -1431,7 +1431,7 @@ No indentation or other \"electric\" behavior is performed."
;; ';' in a K&R argdecl. In
;; that case the declaration
;; should contain a block.
- (c-in-knr-argdecl pos))))))
+ (c-in-knr-argdecl))))))
(cond
((= (point) kluge-start) ; might be BOB or unbalanced parens.