# HG changeset patch # User Alan Mackenzie # Date 1203974150 0 # Node ID 88522cc27adad4be23aa215cce92c0eebdabba71 # Parent 9c33905edcad8f2627375e11771bfa47732e8acf (c-neutralize-syntax-in-CPP): Fix a bug on typing "#" at EOB. diff -r 9c33905edcad -r 88522cc27ada lisp/progmodes/cc-mode.el --- a/lisp/progmodes/cc-mode.el Mon Feb 25 21:14:30 2008 +0000 +++ b/lisp/progmodes/cc-mode.el Mon Feb 25 21:15:50 2008 +0000 @@ -845,13 +845,11 @@ (if (setq limits (c-literal-limits)) (goto-char (cdr limits))) - (while (and (< (point) end) - (search-forward-regexp c-anchored-cpp-prefix end t)) + (while (search-forward-regexp c-anchored-cpp-prefix end t) (when (c-beginning-of-macro) ; Guard against being in a string/comment. (setq mbeg (point)) (c-end-of-macro) ; Do we need to go forward 1 char here? No! - (c-neutralize-CPP-line mbeg (point))) - (forward-char)))) ; We might still be in a comment - this is OK. + (c-neutralize-CPP-line mbeg (point)))))) ; We might still be in a comment - this is OK. (defun c-before-change (beg end) ;; Function to be put on `before-change-function'. Primarily, this calls