diff options
| author | Alan Mackenzie | 2011-02-20 18:36:29 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2011-02-20 18:36:29 +0000 |
| commit | bdfbdbb2197aa835bf8c09de964f7ba0cf086633 (patch) | |
| tree | bc326e5849e74e38742c87068ee7e3d204646e54 | |
| parent | aa9c0efca422faa3191144860728cd55a557a7fc (diff) | |
| download | emacs-bdfbdbb2197aa835bf8c09de964f7ba0cf086633.tar.gz emacs-bdfbdbb2197aa835bf8c09de964f7ba0cf086633.zip | |
(c-end-of-statement): Set macro-end correctly at the end of a loop.
| -rw-r--r-- | lisp/progmodes/cc-cmds.el | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index ec913e05c7e..5ac30bc28ce 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el | |||
| @@ -2654,14 +2654,19 @@ sentence motion in or near comments and multiline strings." | |||
| 2654 | ;; Are we about to move forward into or out of a | 2654 | ;; Are we about to move forward into or out of a |
| 2655 | ;; preprocessor command? | 2655 | ;; preprocessor command? |
| 2656 | (when (eq (cdr res) 'macro-boundary) | 2656 | (when (eq (cdr res) 'macro-boundary) |
| 2657 | (save-excursion | 2657 | (setq macro-fence |
| 2658 | (end-of-line) | 2658 | (save-excursion |
| 2659 | (setq macro-fence | 2659 | (if macro-fence |
| 2660 | (and (not (eobp)) | 2660 | (progn |
| 2661 | (progn (c-skip-ws-forward) | 2661 | (end-of-line) |
| 2662 | (c-beginning-of-macro)) | 2662 | (and (not (eobp)) |
| 2663 | (progn (c-end-of-macro) | 2663 | (progn (c-skip-ws-forward) |
| 2664 | (point)))))) | 2664 | (c-beginning-of-macro)) |
| 2665 | (progn (c-end-of-macro) | ||
| 2666 | (point)))) | ||
| 2667 | (and (not (eobp)) | ||
| 2668 | (c-beginning-of-macro) | ||
| 2669 | (progn (c-end-of-macro) (point))))))) | ||
| 2665 | ;; Are we about to move forward into a literal? | 2670 | ;; Are we about to move forward into a literal? |
| 2666 | (when (memq (cdr res) '(macro-boundary literal)) | 2671 | (when (memq (cdr res) '(macro-boundary literal)) |
| 2667 | (setq range (c-ascertain-following-literal))) | 2672 | (setq range (c-ascertain-following-literal))) |