]> git.eshelyaron.com Git - emacs.git/commitdiff
CC Mode manual: remove reference to former Emacs variable last-command-char
authorAlan Mackenzie <acm@muc.de>
Sun, 9 Oct 2016 13:42:57 +0000 (13:42 +0000)
committerAlan Mackenzie <acm@muc.de>
Sun, 9 Oct 2016 13:42:57 +0000 (13:42 +0000)
* doc/misc/cc-mode.texi (Hanging Semicolons and Commas): Replace reference to
variable last-command-char by one to macro c-last-command-char.

doc/misc/cc-mode.texi

index 30b750ac03aae10ebdcf63d64af80268e7370111..2d95fb824fc3af19ec99a908034daacb976852d1 100644 (file)
@@ -3543,10 +3543,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