1 ;;===-- docs/flang-c-style.el ------------------------------------===;;
3 ;; Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 ;; See https://llvm.org/LICENSE.txt for license information.
5 ;; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 ;;===----------------------------------------------------------------------===;;
9 ;; Define a cc-mode style for editing C++ codes in Flang.
11 ;; Inspired from LLVM style in
12 ;; https://github.com/llvm/llvm-project/blob/main/llvm/utils/emacs/emacs.el
18 (c++-indent-level .
2)
20 (indent-tabs-mode . nil
)
24 (member-init-intro .
++)
30 ;; Use the following to make it the default.
33 (defun flang-c-mode-hook ()
37 (add-hook 'c-mode-hook
'flang-c-mode-hook
)
38 (add-hook 'c
++-mode-hook
'flang-c-mode-hook
)