diff options
| author | Richard M. Stallman <rms@gnu.org> | 1994-10-02 03:44:59 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1994-10-02 03:44:59 +0000 |
| commit | a68ac8b57ae4be26656265679c6ce0cb8d75da21 (patch) | |
| tree | 530d4990967e3e1b663352c2b59d50bc6ea39d2c | |
| parent | df0b5ea16eff7eeefe0b9c2c6f675b81a49eb212 (diff) | |
| download | emacs-a68ac8b57ae4be26656265679c6ce0cb8d75da21.tar.gz | |
(indent-c++-exp): For public/private/protected,
don't do the case/label adjustment.
| -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) ?\}) |
