emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 4f406e9: CC Mode manual: remove reference to form


From: Alan Mackenzie
Subject: [Emacs-diffs] emacs-25 4f406e9: CC Mode manual: remove reference to former Emacs variable last-command-char
Date: Sun, 9 Oct 2016 13:45:27 +0000 (UTC)

branch: emacs-25
commit 4f406e9813e073b675bb45613bf1dd111eec2368
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>

    CC Mode manual: remove reference to former Emacs variable last-command-char
    
    * 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 |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index 30b750a..2d95fb8 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]