]> git.eshelyaron.com Git - emacs.git/commitdiff
(electric-c++-terminator): Fix logic for handling colon.
authorRichard M. Stallman <rms@gnu.org>
Wed, 28 Jun 1995 21:25:06 +0000 (21:25 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 28 Jun 1995 21:25:06 +0000 (21:25 +0000)
lisp/progmodes/cplus-md.el

index 647f08ba493699bbe4a0a9a29a475cdea9b5064d..8c93118d91b33425701a0adc73097418e7738cd6 100644 (file)
@@ -301,15 +301,15 @@ no args if that value is non-nil."
                        ;; So quickly rule out most other uses of colon
                        ;; and do no indentation for them.
                        (and (eq last-command-char ?:)
-                            (not (looking-at "case[ \t]"))
-                            (save-excursion
-                              (forward-word 1)
-                              (skip-chars-forward " \t")
-                              (< (point) end))
-                            ;; Do re-indent double colons
-                            (save-excursion
-                              (end-of-line 1)
-                              (looking-at ":")))
+                            (or (not (or (looking-at "case[ \t]")
+                                         (save-excursion
+                                           (forward-word 1)
+                                           (skip-chars-forward " \t")
+                                           (>= (point) end))))
+                                ;; Do re-indent double colons
+                                (save-excursion
+                                  (end-of-line 1)
+                                  (looking-at ":"))))
                        (progn
                          (beginning-of-defun)
                          (let ((pps (parse-partial-sexp (point) end)))