diff options
| author | Alan Mackenzie | 2011-08-16 20:10:40 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2011-08-16 20:10:40 +0000 |
| commit | 9c4aeabf550b825ddfd501b49d5df0c31ab6b446 (patch) | |
| tree | c52921c97914eb75defe5efebde939b5efd2704d | |
| parent | b215eee57d8427ac896f42a9546930cd852a1637 (diff) | |
| download | emacs-9c4aeabf550b825ddfd501b49d5df0c31ab6b446.tar.gz emacs-9c4aeabf550b825ddfd501b49d5df0c31ab6b446.zip | |
progmodes/cc-engine.el (c-state-cache-non-literal-place): Correct to
avoid the insides of macros.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 16 |
2 files changed, 15 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 70d34fb7117..a18344766f5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-08-16 Alan Mackenzie <acm@muc.de> | ||
| 2 | |||
| 3 | * progmodes/cc-engine.el (c-state-cache-non-literal-place): | ||
| 4 | Correct, to avoid the inside of macros. | ||
| 5 | |||
| 1 | 2011-08-16 Richard Stallman <rms@gnu.org> | 6 | 2011-08-16 Richard Stallman <rms@gnu.org> |
| 2 | 7 | ||
| 3 | * epa-mail.el: Handle GnuPG group definitions. | 8 | * epa-mail.el: Handle GnuPG group definitions. |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 0236a2be296..0d88f85d263 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -2130,13 +2130,17 @@ comment at the start of cc-engine.el for more info." | |||
| 2130 | pos)) | 2130 | pos)) |
| 2131 | 2131 | ||
| 2132 | (defsubst c-state-cache-non-literal-place (pos state) | 2132 | (defsubst c-state-cache-non-literal-place (pos state) |
| 2133 | ;; Return a position outside of a string/comment at or before POS. | 2133 | ;; Return a position outside of a string/comment/macro at or before POS. |
| 2134 | ;; STATE is the parse-partial-sexp state at POS. | 2134 | ;; STATE is the parse-partial-sexp state at POS. |
| 2135 | (if (or (nth 3 state) ; in a string? | 2135 | (let ((res (if (or (nth 3 state) ; in a string? |
| 2136 | (nth 4 state)) ; in a comment? | 2136 | (nth 4 state)) ; in a comment? |
| 2137 | (nth 8 state) | 2137 | (nth 8 state) |
| 2138 | pos)) | 2138 | pos))) |
| 2139 | 2139 | (save-excursion | |
| 2140 | (goto-char res) | ||
| 2141 | (if (c-beginning-of-macro) | ||
| 2142 | (point) | ||
| 2143 | res)))) | ||
| 2140 | 2144 | ||
| 2141 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 2145 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 2142 | ;; Stuff to do with point-min, and coping with any literal there. | 2146 | ;; Stuff to do with point-min, and coping with any literal there. |