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

don't do the case/label adjustment.
This commit is contained in:
Richard M. Stallman 1994-10-02 03:44:59 +00:00
parent df0b5ea16e
commit a68ac8b57a

View file

@ -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) ?\})