diff options
Diffstat (limited to 'doc/misc')
-rw-r--r-- | doc/misc/cc-mode.texi | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 691616917b7..4f7711184d0 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -3544,10 +3544,11 @@ use, add this function to the front of the @example (defun c-semi&comma-no-newlines-before-nonblanks () (save-excursion - (if (and (eq last-command-char ?\;) - (zerop (forward-line 1)) - (not (looking-at "^[ \t]*$"))) - 'stop + (if (and (= (c-last-command-char) ?\;) + (zerop (forward-line 1)) + (bolp) ; forward-line has funny behavior at eob. + (not (looking-at "^[ \t]*$"))) + 'stop nil))) @end example @end defun |