diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 114 |
2 files changed, 62 insertions, 57 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 789d41ad1da..70052409d66 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-09-15 Alan Mackenzie <acm@muc.de> | ||
| 2 | |||
| 3 | * progmodes/cc-engine.el (c-forward-<>-arglist-recur): Correct the | ||
| 4 | indentation. | ||
| 5 | |||
| 1 | 2010-09-15 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2010-09-15 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * emacs-lisp/bytecomp.el (byte-compile-warning-types): New type | 8 | * emacs-lisp/bytecomp.el (byte-compile-warning-types): New type |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index e389007065a..195d4f6cf71 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -5449,49 +5449,49 @@ comment at the start of cc-engine.el for more info." | |||
| 5449 | (forward-char) | 5449 | (forward-char) |
| 5450 | 5450 | ||
| 5451 | (unless (looking-at c-<-op-cont-regexp) | 5451 | (unless (looking-at c-<-op-cont-regexp) |
| 5452 | (while (and | 5452 | (while (and |
| 5453 | (progn | 5453 | (progn |
| 5454 | (c-forward-syntactic-ws) | 5454 | (c-forward-syntactic-ws) |
| 5455 | (let ((orig-record-found-types c-record-found-types)) | 5455 | (let ((orig-record-found-types c-record-found-types)) |
| 5456 | (when (or (and c-record-type-identifiers all-types) | 5456 | (when (or (and c-record-type-identifiers all-types) |
| 5457 | (c-major-mode-is 'java-mode)) | 5457 | (c-major-mode-is 'java-mode)) |
| 5458 | ;; All encountered identifiers are types, so set the | 5458 | ;; All encountered identifiers are types, so set the |
| 5459 | ;; promote flag and parse the type. | 5459 | ;; promote flag and parse the type. |
| 5460 | (progn | 5460 | (progn |
| 5461 | (c-forward-syntactic-ws) | 5461 | (c-forward-syntactic-ws) |
| 5462 | (if (looking-at "\\?") | 5462 | (if (looking-at "\\?") |
| 5463 | (forward-char) | 5463 | (forward-char) |
| 5464 | (when (looking-at c-identifier-start) | 5464 | (when (looking-at c-identifier-start) |
| 5465 | (let ((c-promote-possible-types t) | 5465 | (let ((c-promote-possible-types t) |
| 5466 | (c-record-found-types t)) | 5466 | (c-record-found-types t)) |
| 5467 | (c-forward-type)))) | 5467 | (c-forward-type)))) |
| 5468 | 5468 | ||
| 5469 | (c-forward-syntactic-ws) | 5469 | (c-forward-syntactic-ws) |
| 5470 | 5470 | ||
| 5471 | (when (or (looking-at "extends") | 5471 | (when (or (looking-at "extends") |
| 5472 | (looking-at "super")) | 5472 | (looking-at "super")) |
| 5473 | (forward-word) | 5473 | (forward-word) |
| 5474 | (c-forward-syntactic-ws) | 5474 | (c-forward-syntactic-ws) |
| 5475 | (let ((c-promote-possible-types t) | 5475 | (let ((c-promote-possible-types t) |
| 5476 | (c-record-found-types t)) | 5476 | (c-record-found-types t)) |
| 5477 | (c-forward-type) | 5477 | (c-forward-type) |
| 5478 | (c-forward-syntactic-ws)))))) | 5478 | (c-forward-syntactic-ws)))))) |
| 5479 | |||
| 5480 | (setq pos (point)) | ||
| 5481 | |||
| 5482 | (or | ||
| 5483 | ;; Note: These regexps exploit the match order in \| so | ||
| 5484 | ;; that "<>" is matched by "<" rather than "[^>:-]>". | ||
| 5485 | (c-syntactic-re-search-forward | ||
| 5486 | ;; Stop on ',', '|', '&', '+' and '-' to catch | ||
| 5487 | ;; common binary operators that could be between | ||
| 5488 | ;; two comparison expressions "a<b" and "c>d". | ||
| 5489 | "[<;{},|+&-]\\|[>)]" | ||
| 5490 | nil t t) | ||
| 5491 | t)) | ||
| 5492 | 5479 | ||
| 5493 | (cond | 5480 | (setq pos (point)) |
| 5494 | ((eq (char-before) ?>) | 5481 | |
| 5482 | (or | ||
| 5483 | ;; Note: These regexps exploit the match order in \| so | ||
| 5484 | ;; that "<>" is matched by "<" rather than "[^>:-]>". | ||
| 5485 | (c-syntactic-re-search-forward | ||
| 5486 | ;; Stop on ',', '|', '&', '+' and '-' to catch | ||
| 5487 | ;; common binary operators that could be between | ||
| 5488 | ;; two comparison expressions "a<b" and "c>d". | ||
| 5489 | "[<;{},|+&-]\\|[>)]" | ||
| 5490 | nil t t) | ||
| 5491 | t)) | ||
| 5492 | |||
| 5493 | (cond | ||
| 5494 | ((eq (char-before) ?>) | ||
| 5495 | ;; Either an operator starting with '>' or the end of | 5495 | ;; Either an operator starting with '>' or the end of |
| 5496 | ;; the angle bracket arglist. | 5496 | ;; the angle bracket arglist. |
| 5497 | 5497 | ||
| @@ -5532,14 +5532,14 @@ comment at the start of cc-engine.el for more info." | |||
| 5532 | (when (or (setq keyword-match | 5532 | (when (or (setq keyword-match |
| 5533 | (looking-at c-opt-<>-sexp-key)) | 5533 | (looking-at c-opt-<>-sexp-key)) |
| 5534 | (not (looking-at c-keywords-regexp))) | 5534 | (not (looking-at c-keywords-regexp))) |
| 5535 | (setq id-start (point)))) | 5535 | (setq id-start (point)))) |
| 5536 | 5536 | ||
| 5537 | (setq subres | 5537 | (setq subres |
| 5538 | (let ((c-promote-possible-types t) | 5538 | (let ((c-promote-possible-types t) |
| 5539 | (c-record-found-types t)) | 5539 | (c-record-found-types t)) |
| 5540 | (c-forward-<>-arglist-recur | 5540 | (c-forward-<>-arglist-recur |
| 5541 | (and keyword-match | 5541 | (and keyword-match |
| 5542 | (c-keyword-member | 5542 | (c-keyword-member |
| 5543 | (c-keyword-sym (match-string 1)) | 5543 | (c-keyword-sym (match-string 1)) |
| 5544 | 'c-<>-type-kwds))))) | 5544 | 'c-<>-type-kwds))))) |
| 5545 | ))) | 5545 | ))) |
| @@ -5560,16 +5560,16 @@ comment at the start of cc-engine.el for more info." | |||
| 5560 | (c-forward-syntactic-ws) | 5560 | (c-forward-syntactic-ws) |
| 5561 | (looking-at c-opt-identifier-concat-key))) | 5561 | (looking-at c-opt-identifier-concat-key))) |
| 5562 | (c-record-ref-id (cons id-start id-end)) | 5562 | (c-record-ref-id (cons id-start id-end)) |
| 5563 | (c-record-type-id (cons id-start id-end)))))) | 5563 | (c-record-type-id (cons id-start id-end)))))) |
| 5564 | t) | 5564 | t) |
| 5565 | 5565 | ||
| 5566 | ((and (not c-restricted-<>-arglists) | 5566 | ((and (not c-restricted-<>-arglists) |
| 5567 | (or (and (eq (char-before) ?&) | 5567 | (or (and (eq (char-before) ?&) |
| 5568 | (not (eq (char-after) ?&))) | 5568 | (not (eq (char-after) ?&))) |
| 5569 | (eq (char-before) ?,))) | 5569 | (eq (char-before) ?,))) |
| 5570 | ;; Just another argument. Record the position. The | 5570 | ;; Just another argument. Record the position. The |
| 5571 | ;; type check stuff that made us stop at it is at | 5571 | ;; type check stuff that made us stop at it is at |
| 5572 | ;; the top of the loop. | 5572 | ;; the top of the loop. |
| 5573 | (setq arg-start-pos (cons (point) arg-start-pos))) | 5573 | (setq arg-start-pos (cons (point) arg-start-pos))) |
| 5574 | 5574 | ||
| 5575 | (t | 5575 | (t |