summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-03-21 14:16:06 +0000
committerRichard M. Stallman <rms@gnu.org>1996-03-21 14:16:06 +0000
commit392dc3eb68aadae6ebb3670c14eb777861d77a18 (patch)
treecc17a14f2eea45ad098f50305dccf21beacda556 /lisp
parentc7f41c3d92cac665000e852623b1ba37ad1e2a8f (diff)
downloademacs-392dc3eb68aadae6ebb3670c14eb777861d77a18.tar.gz
(indent-c++-exp): Use calculate-c-indent-after-brace.
(c++-mode): Require c-mode.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/cplus-md.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/cplus-md.el b/lisp/progmodes/cplus-md.el
index 5e017473e8b..555f5a44d18 100644
--- a/lisp/progmodes/cplus-md.el
+++ b/lisp/progmodes/cplus-md.el
@@ -320,6 +320,8 @@ Turning on C++ mode calls the value of the variable `c++-mode-hook' with
no args if that value is non-nil."
(interactive)
(kill-all-local-variables)
+ ;; This code depends on the old C mode.
+ (require 'c-mode)
(use-local-map c++-mode-map)
(set-syntax-table c++-mode-syntax-table)
(setq major-mode 'c++-mode
@@ -801,7 +803,7 @@ Returns nil if line starts inside a string, t if in a comment."
(if (= (char-after (car contain-stack)) ?{)
(save-excursion
(goto-char (car contain-stack))
- (setq val (+ c-indent-level (current-column))))
+ (setq val (calculate-c-indent-after-brace)))
(setq val (calculate-c++-indent
(if (car indent-stack)
(- (car indent-stack))))))