diff options
| author | Alan Mackenzie | 2011-03-06 17:03:45 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2011-03-06 17:03:45 +0000 |
| commit | 804a116c9d1bae9e7f0feb48657ad44691a4557c (patch) | |
| tree | f73e4917eb390d60db657e062b10311864cfcb4d | |
| parent | 9d1f0f559d5331f6ace4feab5ac3e7c2932949a5 (diff) | |
| download | emacs-804a116c9d1bae9e7f0feb48657ad44691a4557c.tar.gz emacs-804a116c9d1bae9e7f0feb48657ad44691a4557c.zip | |
(c-guess-basic-syntax): Move CASE 19 to a different place, correctly to
process template-args-cont lines.
| -rw-r--r-- | lisp/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 44 |
2 files changed, 29 insertions, 28 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 75c1818b24d..0965642a0ea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,15 +1,16 @@ | |||
| 1 | 2011-03-06 Alan Mackenzie <acm@muc.de> | 1 | 2011-03-06 Alan Mackenzie <acm@muc.de> |
| 2 | 2 | ||
| 3 | * progmodes/cc-engine.el (c-guess-basic-syntax): Reindent. | 3 | * progmodes/cc-engine.el (c-guess-basic-syntax): Reindent. |
| 4 | (c-guess-basic-syntax): Move CASE 19 to a different place, | ||
| 5 | correctly to process template-args-cont lines. | ||
| 4 | 6 | ||
| 5 | 2011-03-06 Jay Belanger <jay.p.belanger@gmail.com> | 7 | 2011-03-06 Jay Belanger <jay.p.belanger@gmail.com> |
| 6 | 8 | ||
| 7 | * calc/calc-ext.el (calc-init-extensions): | 9 | * calc/calc-ext.el (calc-init-extensions): Rename |
| 8 | Rename calc-logunits-dblevel and calc-logunits-nplevel to | 10 | calc-logunits-dblevel and calc-logunits-nplevel to calc-dblevel |
| 9 | calc-dblevel and calc-nplevel, respectively. | 11 | and calc-nplevel, respectively. Add keybindings for calc-spn, |
| 10 | Add keybindings for calc-spn, calc-midi and calc-freq. Add | 12 | calc-midi and calc-freq. Add autoloads for calcFunc-spn, |
| 11 | autoloads for calcFunc-spn, calcFunc-midi, calcFunc-freq, | 13 | calcFunc-midi, calcFunc-freq, calc-spn, calc-midi and calc-freq. |
| 12 | calc-spn, calc-midi and calc-freq. | ||
| 13 | 14 | ||
| 14 | * calc/calc-units.el (calc-dblevel): Rename from | 15 | * calc/calc-units.el (calc-dblevel): Rename from |
| 15 | calc-logunits-dblevel. | 16 | calc-logunits-dblevel. |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index e84ea3c1dcd..5ef12300195 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -9628,28 +9628,6 @@ comment at the start of cc-engine.el for more info." | |||
| 9628 | (c-most-enclosing-brace paren-state (point)) | 9628 | (c-most-enclosing-brace paren-state (point)) |
| 9629 | paren-state)) | 9629 | paren-state)) |
| 9630 | 9630 | ||
| 9631 | ;; CASE 19: line is an expression, not a statement, and is directly | ||
| 9632 | ;; contained by a template delimiter. Most likely, we are in a | ||
| 9633 | ;; template arglist within a statement. This case is based on CASE | ||
| 9634 | ;; 7. At some point in the future, we may wish to create more | ||
| 9635 | ;; syntactic symbols such as `template-intro', | ||
| 9636 | ;; `template-cont-nonempty', etc., and distinguish between them as we | ||
| 9637 | ;; do for `arglist-intro' etc. (2009-12-07). | ||
| 9638 | ((and c-recognize-<>-arglists | ||
| 9639 | (setq containing-< (c-up-list-backward indent-point containing-sexp)) | ||
| 9640 | (eq (char-after containing-<) ?\<)) | ||
| 9641 | (setq placeholder (c-point 'boi containing-<)) | ||
| 9642 | (goto-char containing-sexp) ; Most nested Lbrace/Lparen (but not | ||
| 9643 | ; '<') before indent-point. | ||
| 9644 | (if (>= (point) placeholder) | ||
| 9645 | (progn | ||
| 9646 | (forward-char) | ||
| 9647 | (skip-chars-forward " \t")) | ||
| 9648 | (goto-char placeholder)) | ||
| 9649 | (c-add-stmt-syntax 'template-args-cont (list containing-<) t | ||
| 9650 | (c-most-enclosing-brace c-state-cache (point)) | ||
| 9651 | paren-state)) | ||
| 9652 | |||
| 9653 | ;; CASE 7B: Looking at the opening brace of an | 9631 | ;; CASE 7B: Looking at the opening brace of an |
| 9654 | ;; in-expression block or brace list. C.f. cases 4, 16A | 9632 | ;; in-expression block or brace list. C.f. cases 4, 16A |
| 9655 | ;; and 17E. | 9633 | ;; and 17E. |
| @@ -9986,6 +9964,28 @@ comment at the start of cc-engine.el for more info." | |||
| 9986 | paren-state)) | 9964 | paren-state)) |
| 9987 | )) | 9965 | )) |
| 9988 | 9966 | ||
| 9967 | ;; CASE 19: line is an expression, not a statement, and is directly | ||
| 9968 | ;; contained by a template delimiter. Most likely, we are in a | ||
| 9969 | ;; template arglist within a statement. This case is based on CASE | ||
| 9970 | ;; 7. At some point in the future, we may wish to create more | ||
| 9971 | ;; syntactic symbols such as `template-intro', | ||
| 9972 | ;; `template-cont-nonempty', etc., and distinguish between them as we | ||
| 9973 | ;; do for `arglist-intro' etc. (2009-12-07). | ||
| 9974 | ((and c-recognize-<>-arglists | ||
| 9975 | (setq containing-< (c-up-list-backward indent-point containing-sexp)) | ||
| 9976 | (eq (char-after containing-<) ?\<)) | ||
| 9977 | (setq placeholder (c-point 'boi containing-<)) | ||
| 9978 | (goto-char containing-sexp) ; Most nested Lbrace/Lparen (but not | ||
| 9979 | ; '<') before indent-point. | ||
| 9980 | (if (>= (point) placeholder) | ||
| 9981 | (progn | ||
| 9982 | (forward-char) | ||
| 9983 | (skip-chars-forward " \t")) | ||
| 9984 | (goto-char placeholder)) | ||
| 9985 | (c-add-stmt-syntax 'template-args-cont (list containing-<) t | ||
| 9986 | (c-most-enclosing-brace c-state-cache (point)) | ||
| 9987 | paren-state)) | ||
| 9988 | |||
| 9989 | ;; CASE 17: Statement or defun catchall. | 9989 | ;; CASE 17: Statement or defun catchall. |
| 9990 | (t | 9990 | (t |
| 9991 | (goto-char indent-point) | 9991 | (goto-char indent-point) |