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

(indent-c++-exp): For public/private/protected,

don't do the case/label adjustment.
parent df0b5ea1
......@@ -694,13 +694,13 @@ Returns nil if line starts inside a string, t if in a comment."
(setq this-indent val))))
;; Adjust line indentation according to its contents
(if (looking-at "\\(public\\|private\\|protected\\):")
(setq this-indent (- this-indent c-indent-level)))
(if (or (looking-at "case[ \t]")
(and (looking-at "[A-Za-z]")
(save-excursion
(forward-sexp 1)
(looking-at ":[^:]"))))
(setq this-indent (max 1 (+ this-indent c-label-offset))))
(setq this-indent (- this-indent c-indent-level))
(if (or (looking-at "case[ \t]")
(and (looking-at "[A-Za-z]")
(save-excursion
(forward-sexp 1)
(looking-at ":[^:]"))))
(setq this-indent (max 1 (+ this-indent c-label-offset)))))
(if (looking-at "friend[ \t]")
(setq this-indent (+ this-indent c++-friend-offset)))
(if (= (following-char) ?\})
......
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