aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorAlan Mackenzie2013-01-25 18:18:14 +0000
committerAlan Mackenzie2013-01-25 18:18:14 +0000
commitb7aea0ffb633e0787654d2c570a8a2fa63703f18 (patch)
treee8bf5b0f793e0dd5d3bdae95822a36180e26e095 /lisp/progmodes
parent59e624b37b84a4915d1f05e8fe77e48d941499f4 (diff)
downloademacs-b7aea0ffb633e0787654d2c570a8a2fa63703f18.tar.gz
emacs-b7aea0ffb633e0787654d2c570a8a2fa63703f18.zip
AWK Mode: Fix indentation bug at top level. Bug #12274.
progmodes/cc-engine.el (c-guess-basic-syntax): Move CASE 5P to just before CASE 5D.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/cc-engine.el24
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 1eac45d06e0..d4e4d6de483 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -9842,6 +9842,18 @@ comment at the start of cc-engine.el for more info."
9842 ;; contains any class offset 9842 ;; contains any class offset
9843 ))) 9843 )))
9844 9844
9845 ;; CASE 5P: AWK pattern or function or continuation
9846 ;; thereof.
9847 ((c-major-mode-is 'awk-mode)
9848 (setq placeholder (point))
9849 (c-add-stmt-syntax
9850 (if (and (eq (c-beginning-of-statement-1) 'same)
9851 (/= (point) placeholder))
9852 'topmost-intro-cont
9853 'topmost-intro)
9854 nil nil
9855 containing-sexp paren-state))
9856
9845 ;; CASE 5D: this could be a top-level initialization, a 9857 ;; CASE 5D: this could be a top-level initialization, a
9846 ;; member init list continuation, or a template argument 9858 ;; member init list continuation, or a template argument
9847 ;; list continuation. 9859 ;; list continuation.
@@ -10001,18 +10013,6 @@ comment at the start of cc-engine.el for more info."
10001 (goto-char (point-min))) 10013 (goto-char (point-min)))
10002 (c-add-syntax 'objc-method-intro (c-point 'boi))) 10014 (c-add-syntax 'objc-method-intro (c-point 'boi)))
10003 10015
10004 ;; CASE 5P: AWK pattern or function or continuation
10005 ;; thereof.
10006 ((c-major-mode-is 'awk-mode)
10007 (setq placeholder (point))
10008 (c-add-stmt-syntax
10009 (if (and (eq (c-beginning-of-statement-1) 'same)
10010 (/= (point) placeholder))
10011 'topmost-intro-cont
10012 'topmost-intro)
10013 nil nil
10014 containing-sexp paren-state))
10015
10016 ;; CASE 5N: At a variable declaration that follows a class 10016 ;; CASE 5N: At a variable declaration that follows a class
10017 ;; definition or some other block declaration that doesn't 10017 ;; definition or some other block declaration that doesn't
10018 ;; end at the closing '}'. C.f. case 5D.5. 10018 ;; end at the closing '}'. C.f. case 5D.5.