Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
9c4aeabf
Commit
9c4aeabf
authored
Aug 16, 2011
by
Alan Mackenzie
Browse files
progmodes/cc-engine.el (c-state-cache-non-literal-place): Correct to
avoid the insides of macros.
parent
b215eee5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-engine.el
+10
-6
No files found.
lisp/ChangeLog
View file @
9c4aeabf
2011-08-16 Alan Mackenzie <acm@muc.de>
* progmodes/cc-engine.el (c-state-cache-non-literal-place):
Correct, to avoid the inside of macros.
2011-08-16 Richard Stallman <rms@gnu.org>
* epa-mail.el: Handle GnuPG group definitions.
...
...
lisp/progmodes/cc-engine.el
View file @
9c4aeabf
...
...
@@ -2130,13 +2130,17 @@ comment at the start of cc-engine.el for more info."
pos))
(defsubst c-state-cache-non-literal-place (pos state)
;; Return a position outside of a string/comment at or before POS.
;; Return a position outside of a string/comment
/macro
at or before POS.
;; STATE is the parse-partial-sexp state at POS.
(if (or (nth 3 state) ; in a string?
(nth 4 state)) ; in a comment?
(nth 8 state)
pos))
(let ((res (if (or (nth 3 state) ; in a string?
(nth 4 state)) ; in a comment?
(nth 8 state)
pos)))
(save-excursion
(goto-char res)
(if (c-beginning-of-macro)
(point)
res))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Stuff to do with point-min, and coping with any literal there.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment