diff options
Diffstat (limited to 'lisp/progmodes/cplus-md.el')
| -rw-r--r-- | lisp/progmodes/cplus-md.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/progmodes/cplus-md.el b/lisp/progmodes/cplus-md.el index 07db75eb822..8d1e8267042 100644 --- a/lisp/progmodes/cplus-md.el +++ b/lisp/progmodes/cplus-md.el @@ -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) ?\}) |
