From b23c9e46bd9d3471ae7b8ca2e45912306510d09d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 21 Mar 1996 14:16:06 +0000 Subject: [PATCH] (indent-c++-exp): Use calculate-c-indent-after-brace. (c++-mode): Require c-mode. --- lisp/progmodes/cplus-md.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)))))) -- 2.39.2