diff options
| author | Alan Mackenzie | 2012-09-08 20:00:13 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2012-09-08 20:00:13 +0000 |
| commit | ace2989a842a84483702cbef6284fe7a8300e18a (patch) | |
| tree | 6d04572259cc9cd925650b2bd736cd5a1a5ac706 | |
| parent | eabf0404414f2828c08d1d5d8fab4740670e7541 (diff) | |
| download | emacs-ace2989a842a84483702cbef6284fe7a8300e18a.tar.gz emacs-ace2989a842a84483702cbef6284fe7a8300e18a.zip | |
AWK Mode: make auto-newline work when there's "==" in the pattern.
cc-cmds.el (c-point-syntax): Handle virtual semicolons correctly.
cc-engine.el (c-guess-basic-syntax CASE 5A.3): Test more rigorously for
"=" token.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/progmodes/cc-cmds.el | 17 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 4 |
3 files changed, 20 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 10458236c30..ea69865c79f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2012-09-08 Alan Mackenzie <acm@muc.de> | ||
| 2 | |||
| 3 | AWK Mode: make auto-newline work when there's "==" in the pattern. | ||
| 4 | * progmodes/cc-cmds.el (c-point-syntax): Handle virtual semicolons | ||
| 5 | correctly. | ||
| 6 | * progmodes/cc-engine.el (c-guess-basic-syntax CASE 5A.3): Test | ||
| 7 | more rigorously for "=" token. | ||
| 8 | |||
| 1 | 2012-09-08 Dmitry Gutov <dgutov@yandex.ru> | 9 | 2012-09-08 Dmitry Gutov <dgutov@yandex.ru> |
| 2 | 10 | ||
| 3 | * progmodes/ruby-mode.el (ruby-match-expression-expansion): Only | 11 | * progmodes/ruby-mode.el (ruby-match-expression-expansion): Only |
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 7cd0a0b0ae2..eec6873dc19 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el | |||
| @@ -493,13 +493,16 @@ inside a literal or a macro, nothing special happens." | |||
| 493 | (insert-char ?\n 1) | 493 | (insert-char ?\n 1) |
| 494 | ;; In AWK (etc.) or in a macro, make sure this CR hasn't changed | 494 | ;; In AWK (etc.) or in a macro, make sure this CR hasn't changed |
| 495 | ;; the syntax. (There might already be an escaped NL there.) | 495 | ;; the syntax. (There might already be an escaped NL there.) |
| 496 | (when (or (c-at-vsemi-p (1- (point))) | 496 | (when (or |
| 497 | (let ((pt (point))) | 497 | (save-excursion |
| 498 | (save-excursion | 498 | (c-skip-ws-backward (c-point 'bopl)) |
| 499 | (backward-char) | 499 | (c-at-vsemi-p)) |
| 500 | (and (c-beginning-of-macro) | 500 | (let ((pt (point))) |
| 501 | (progn (c-end-of-macro) | 501 | (save-excursion |
| 502 | (< (point) pt)))))) | 502 | (backward-char) |
| 503 | (and (c-beginning-of-macro) | ||
| 504 | (progn (c-end-of-macro) | ||
| 505 | (< (point) pt)))))) | ||
| 503 | (backward-char) | 506 | (backward-char) |
| 504 | (insert-char ?\\ 1) | 507 | (insert-char ?\\ 1) |
| 505 | (forward-char)) | 508 | (forward-char)) |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 142ec4cdd66..9188ab2fbfd 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -9579,12 +9579,12 @@ comment at the start of cc-engine.el for more info." | |||
| 9579 | (setq tmpsymbol nil) | 9579 | (setq tmpsymbol nil) |
| 9580 | (while (and (> (point) placeholder) | 9580 | (while (and (> (point) placeholder) |
| 9581 | (zerop (c-backward-token-2 1 t)) | 9581 | (zerop (c-backward-token-2 1 t)) |
| 9582 | (/= (char-after) ?=)) | 9582 | (not (looking-at "=\\([^=]\\|$\\)"))) |
| 9583 | (and c-opt-inexpr-brace-list-key | 9583 | (and c-opt-inexpr-brace-list-key |
| 9584 | (not tmpsymbol) | 9584 | (not tmpsymbol) |
| 9585 | (looking-at c-opt-inexpr-brace-list-key) | 9585 | (looking-at c-opt-inexpr-brace-list-key) |
| 9586 | (setq tmpsymbol 'topmost-intro-cont))) | 9586 | (setq tmpsymbol 'topmost-intro-cont))) |
| 9587 | (eq (char-after) ?=)) | 9587 | (looking-at "=\\([^=]\\|$\\)")) |
| 9588 | (looking-at c-brace-list-key)) | 9588 | (looking-at c-brace-list-key)) |
| 9589 | (save-excursion | 9589 | (save-excursion |
| 9590 | (while (and (< (point) indent-point) | 9590 | (while (and (< (point) indent-point) |