]> code.delx.au - gnu-emacs/commitdiff
(c-neutralize-syntax-in-CPP): Fix a bug on typing "#" at EOB.
authorAlan Mackenzie <acm@muc.de>
Mon, 25 Feb 2008 21:15:50 +0000 (21:15 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 25 Feb 2008 21:15:50 +0000 (21:15 +0000)
lisp/progmodes/cc-mode.el

index 9a1a66010b14aa89ea26f384785b5584f90c6eb1..db71bf334088eca1766b206413d451d7b54023d1 100644 (file)
@@ -845,13 +845,11 @@ Note that the style variables are always made local to the buffer."
     (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