aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2007-01-21 19:29:51 +0000
committerAlan Mackenzie2007-01-21 19:29:51 +0000
commitf325b5703c522b36ffb1edfb6efeb1b0f42d90fe (patch)
treeb40b8dc4bb4432cc400d0fa53e94d352b575c264
parenta3466c23711c6cc803b47da90b0f1e3a35212dbb (diff)
downloademacs-f325b5703c522b36ffb1edfb6efeb1b0f42d90fe.tar.gz
emacs-f325b5703c522b36ffb1edfb6efeb1b0f42d90fe.zip
Correct the handling of K&R stuff in c-where-wrt-brace-construct.
-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 070a690b700..96924899ea3 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."
1383 ;; 1383 ;;
1384 ;; This function might do hidden buffer changes. 1384 ;; This function might do hidden buffer changes.
1385 (save-excursion 1385 (save-excursion
1386 (let* (pos 1386 (let* (kluge-start
1387 kluge-start
1388 decl-result brace-decl-p 1387 decl-result brace-decl-p
1389 (start (point)) 1388 (start (point))
1390 (paren-state (c-parse-state)) 1389 (paren-state (c-parse-state))
@@ -1417,11 +1416,12 @@ No indentation or other \"electric\" behavior is performed."
1417 (setq kluge-start (point)) 1416 (setq kluge-start (point))
1418 (setq decl-result 1417 (setq decl-result
1419 (car (c-beginning-of-decl-1 1418 (car (c-beginning-of-decl-1
1419 ;; NOTE: If we're in a K&R region, this might be the start
1420 ;; of a parameter declaration, not the actual function.
1420 (and least-enclosing ; LIMIT for c-b-of-decl-1 1421 (and least-enclosing ; LIMIT for c-b-of-decl-1
1421 (c-safe-position least-enclosing paren-state))))) 1422 (c-safe-position least-enclosing paren-state)))))
1422 1423
1423 ;; Has the declaration we've gone back to got braces? 1424 ;; Has the declaration we've gone back to got braces?
1424 (setq pos (point)) ; the search limit for c-recognize-knr-p
1425 (setq brace-decl-p 1425 (setq brace-decl-p
1426 (save-excursion 1426 (save-excursion
1427 (and (c-syntactic-re-search-forward "[;{]" nil t t) 1427 (and (c-syntactic-re-search-forward "[;{]" nil t t)
@@ -1431,7 +1431,7 @@ No indentation or other \"electric\" behavior is performed."
1431 ;; ';' in a K&R argdecl. In 1431 ;; ';' in a K&R argdecl. In
1432 ;; that case the declaration 1432 ;; that case the declaration
1433 ;; should contain a block. 1433 ;; should contain a block.
1434 (c-in-knr-argdecl pos)))))) 1434 (c-in-knr-argdecl))))))
1435 1435
1436 (cond 1436 (cond
1437 ((= (point) kluge-start) ; might be BOB or unbalanced parens. 1437 ((= (point) kluge-start) ; might be BOB or unbalanced parens.