(indent-c++-exp): For public/private/protected,
don't do the case/label adjustment.
This commit is contained in:
parent
df0b5ea16e
commit
a68ac8b57a
1 changed files with 7 additions and 7 deletions
|
@ -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) ?\})
|
||||
|
|
Loading…
Add table
Reference in a new issue