diff options
| author | Chong Yidong | 2011-03-07 15:05:53 -0500 |
|---|---|---|
| committer | Chong Yidong | 2011-03-07 15:05:53 -0500 |
| commit | 1df1040bf8549ea4c3ae08007a347736adf2fe99 (patch) | |
| tree | b4716ec815dcbe0aced4c4ac545ddb194bd08134 | |
| parent | c6678f2916c22cd3b16232dc941f318c894ef56e (diff) | |
| download | emacs-1df1040bf8549ea4c3ae08007a347736adf2fe99.tar.gz emacs-1df1040bf8549ea4c3ae08007a347736adf2fe99.zip | |
Fix 2011-01-31 change; patch supplied by acm was applied incorrectly.emacs-23.3
* lisp/progmodes/cc-cmds.el (c-beginning-of-statement): Fix 2011-01-31
change; patch supplied by Alan Mackenzie was applied incorrectly.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/progmodes/cc-cmds.el | 33 |
2 files changed, 22 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6d711568fea..1b8a7641b35 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | 2011-03-07 Chong Yidong <cyd@stupidchicken.com> | 5 | 2011-03-07 Chong Yidong <cyd@stupidchicken.com> |
| 6 | 6 | ||
| 7 | * progmodes/cc-cmds.el (c-beginning-of-statement): Revert | 7 | * progmodes/cc-cmds.el (c-beginning-of-statement): Fix 2011-01-31 |
| 8 | 2011-01-31 change. | 8 | change; patch supplied by Alan Mackenzie was applied incorrectly. |
| 9 | 9 | ||
| 10 | 2011-02-26 Eli Zaretskii <eliz@gnu.org> | 10 | 2011-02-26 Eli Zaretskii <eliz@gnu.org> |
| 11 | 11 | ||
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 4deb5ca6afe..bd047e89435 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el | |||
| @@ -2458,13 +2458,15 @@ function does not require the declaration to contain a brace block." | |||
| 2458 | (goto-char last) | 2458 | (goto-char last) |
| 2459 | (throw 'done '(nil . nil))) | 2459 | (throw 'done '(nil . nil))) |
| 2460 | 2460 | ||
| 2461 | ;; Stop if we encounter a preprocessor line. | 2461 | ;; Stop if we encounter a preprocessor line. Continue if we |
| 2462 | ((and (not macro-end) | 2462 | ;; hit a naked # |
| 2463 | ((and c-opt-cpp-prefix | ||
| 2464 | (not macro-end) | ||
| 2463 | (eq (char-after) ?#) | 2465 | (eq (char-after) ?#) |
| 2464 | (= (point) (c-point 'boi))) | 2466 | (= (point) (c-point 'boi))) |
| 2465 | (goto-char last) | 2467 | (if (= (point) here) ; Not a macro, therefore naked #. |
| 2466 | ;(throw 'done (cons (eq (point) here) 'macro-boundary))) ; Changed 2003/3/26 | 2468 | (forward-char) |
| 2467 | (throw 'done '(t . macro-boundary))) | 2469 | (throw 'done '(t . macro-boundary)))) |
| 2468 | 2470 | ||
| 2469 | ;; Stop after a ';', '}', or "};" | 2471 | ;; Stop after a ';', '}', or "};" |
| 2470 | ((looking-at ";\\|};?") | 2472 | ((looking-at ";\\|};?") |
| @@ -2663,14 +2665,19 @@ sentence motion in or near comments and multiline strings." | |||
| 2663 | ;; Are we about to move forward into or out of a | 2665 | ;; Are we about to move forward into or out of a |
| 2664 | ;; preprocessor command? | 2666 | ;; preprocessor command? |
| 2665 | (when (eq (cdr res) 'macro-boundary) | 2667 | (when (eq (cdr res) 'macro-boundary) |
| 2666 | (save-excursion | 2668 | (setq macro-fence |
| 2667 | (end-of-line) | 2669 | (save-excursion |
| 2668 | (setq macro-fence | 2670 | (if macro-fence |
| 2669 | (and (not (eobp)) | 2671 | (progn |
| 2670 | (progn (c-skip-ws-forward) | 2672 | (end-of-line) |
| 2671 | (c-beginning-of-macro)) | 2673 | (and (not (eobp)) |
| 2672 | (progn (c-end-of-macro) | 2674 | (progn (c-skip-ws-forward) |
| 2673 | (point)))))) | 2675 | (c-beginning-of-macro)) |
| 2676 | (progn (c-end-of-macro) | ||
| 2677 | (point)))) | ||
| 2678 | (and (not (eobp)) | ||
| 2679 | (c-beginning-of-macro) | ||
| 2680 | (progn (c-end-of-macro) (point))))))) | ||
| 2674 | ;; Are we about to move forward into a literal? | 2681 | ;; Are we about to move forward into a literal? |
| 2675 | (when (memq (cdr res) '(macro-boundary literal)) | 2682 | (when (memq (cdr res) '(macro-boundary literal)) |
| 2676 | (setq range (c-ascertain-following-literal))) | 2683 | (setq range (c-ascertain-following-literal))) |