]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/cc-align.el
Replace `last-command-event' by `last-command-char' in XEmacs.
[gnu-emacs] / lisp / progmodes / cc-align.el
index cb8d2d23c8472579401f430ec72662ad3811eb3b..cdd0561a0541b7c7eb7f99e9865d2a4da5d9a03a 100644 (file)
@@ -1284,7 +1284,7 @@ newline is added.  In either case, checking is stopped.  This supports
 exactly the old newline insertion behavior."
   ;; newline only after semicolon, but only if that semicolon is not
   ;; inside a parenthesis list (e.g. a for loop statement)
-  (if (not (eq last-command-event ?\;))
+  (if (not (eq (c-last-command-char) ?\;))
       nil                              ; continue checking
     (if (condition-case nil
            (save-excursion
@@ -1301,7 +1301,7 @@ If a comma was inserted, no determination is made.  If a semicolon was
 inserted, and the following line is not blank, no newline is inserted.
 Otherwise, no determination is made."
   (save-excursion
-    (if (and (= last-command-event ?\;)
+    (if (and (= (c-last-command-char) ?\;)
             ;;(/= (point-max)
             ;;    (save-excursion (skip-syntax-forward " ") (point))
             (zerop (forward-line 1))
@@ -1318,13 +1318,13 @@ suppressed in one-liners, if the line is an in-class inline function.
 For other semicolon contexts, no determination is made."
   (let ((syntax (c-guess-basic-syntax))
         (bol (save-excursion
-               (if (c-safe (up-list -1) t)
-                   (c-point 'bol)
-                 -1))))
-    (if (and (eq last-command-event ?\;)
-             (eq (car (car syntax)) 'inclass)
-             (eq (car (car (cdr syntax))) 'topmost-intro)
-             (= (c-point 'bol) bol))
+              (if (c-safe (up-list -1) t)
+                  (c-point 'bol)
+                -1))))
+    (if (and (eq (c-last-command-char) ?\;)
+            (eq (car (car syntax)) 'inclass)
+            (eq (car (car (cdr syntax))) 'topmost-intro)
+            (= (c-point 'bol) bol))
         'stop
       nil)))