changeset 12416:8c1c47eb351a

(electric-c++-terminator): Fix logic for handling colon.
author Richard M. Stallman <rms@gnu.org>
date Wed, 28 Jun 1995 21:25:06 +0000
parents c07a5e8f40ae
children b4d39d2b9795
files lisp/progmodes/cplus-md.el
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cplus-md.el	Wed Jun 28 20:10:12 1995 +0000
+++ b/lisp/progmodes/cplus-md.el	Wed Jun 28 21:25:06 1995 +0000
@@ -301,15 +301,15 @@
 			;; 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)))