From e2b1cb74271b973feaee005696441fdf136e5702 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 28 Jun 1995 21:25:06 +0000 Subject: [PATCH] (electric-c++-terminator): Fix logic for handling colon. --- lisp/progmodes/cplus-md.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/progmodes/cplus-md.el b/lisp/progmodes/cplus-md.el index 647f08ba493..8c93118d91b 100644 --- a/lisp/progmodes/cplus-md.el +++ b/lisp/progmodes/cplus-md.el @@ -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))) -- 2.39.2