Commit e2b1cb74 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(electric-c++-terminator): Fix logic for handling colon.

parent ccd318fb
......@@ -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)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment