mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-23 13:27:36 +00:00
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.
This commit is contained in:
parent
59e624b37b
commit
b7aea0ffb6
2 changed files with 19 additions and 12 deletions
|
|
@ -1,3 +1,10 @@
|
|||
2013-01-25 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
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.
|
||||
|
||||
2013-01-25 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
* net/socks.el (socks-nslookup-host): Use string-to-number.
|
||||
|
|
|
|||
|
|
@ -9842,6 +9842,18 @@ comment at the start of cc-engine.el for more info."
|
|||
;; contains any class offset
|
||||
)))
|
||||
|
||||
;; CASE 5P: AWK pattern or function or continuation
|
||||
;; thereof.
|
||||
((c-major-mode-is 'awk-mode)
|
||||
(setq placeholder (point))
|
||||
(c-add-stmt-syntax
|
||||
(if (and (eq (c-beginning-of-statement-1) 'same)
|
||||
(/= (point) placeholder))
|
||||
'topmost-intro-cont
|
||||
'topmost-intro)
|
||||
nil nil
|
||||
containing-sexp paren-state))
|
||||
|
||||
;; CASE 5D: this could be a top-level initialization, a
|
||||
;; member init list continuation, or a template argument
|
||||
;; list continuation.
|
||||
|
|
@ -10001,18 +10013,6 @@ comment at the start of cc-engine.el for more info."
|
|||
(goto-char (point-min)))
|
||||
(c-add-syntax 'objc-method-intro (c-point 'boi)))
|
||||
|
||||
;; CASE 5P: AWK pattern or function or continuation
|
||||
;; thereof.
|
||||
((c-major-mode-is 'awk-mode)
|
||||
(setq placeholder (point))
|
||||
(c-add-stmt-syntax
|
||||
(if (and (eq (c-beginning-of-statement-1) 'same)
|
||||
(/= (point) placeholder))
|
||||
'topmost-intro-cont
|
||||
'topmost-intro)
|
||||
nil nil
|
||||
containing-sexp paren-state))
|
||||
|
||||
;; CASE 5N: At a variable declaration that follows a class
|
||||
;; definition or some other block declaration that doesn't
|
||||
;; end at the closing '}'. C.f. case 5D.5.
|
||||
|
|
|
|||
Loading…
Reference in a new issue