diff options
| author | Alan Mackenzie | 2013-01-25 18:18:14 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2013-01-25 18:18:14 +0000 |
| commit | b7aea0ffb633e0787654d2c570a8a2fa63703f18 (patch) | |
| tree | e8bf5b0f793e0dd5d3bdae95822a36180e26e095 /lisp | |
| parent | 59e624b37b84a4915d1f05e8fe77e48d941499f4 (diff) | |
| download | emacs-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')
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 24 |
2 files changed, 19 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8e94ec32147..eb9f254a5a8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2013-01-25 Alan Mackenzie <acm@muc.de> | ||
| 2 | |||
| 3 | AWK Mode: Fix indentation bug at top level. Bug #12274. | ||
| 4 | |||
| 5 | * progmodes/cc-engine.el (c-guess-basic-syntax): Move CASE 5P to | ||
| 6 | just before CASE 5D. | ||
| 7 | |||
| 1 | 2013-01-25 Dmitry Antipov <dmantipov@yandex.ru> | 8 | 2013-01-25 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 9 | ||
| 3 | * net/socks.el (socks-nslookup-host): Use string-to-number. | 10 | * net/socks.el (socks-nslookup-host): Use string-to-number. |
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. |