作者:mobiledu2502890883 | 来源:互联网 | 2023-05-18 22:19
I'm using the bsd style of indentation in emacs & I'd like to modify it a bit. The related portion of my .emacs file is below. When I write a function with try catch blocks the braces are indented. I'd like them to not indent similar to a function.
我在emacs中使用bsd缩进样式,我想稍微修改一下。我的.emacs文件的相关部分如下。当我用try catch块编写函数时,大括号会缩进。我希望他们不要像函数那样缩进。
What's it's doing now.
它现在在做什么
try
{
}
catch
{
}
What I'd like it to do.
我想要它做什么。
try
{
}
catch
{
}
.emacs file
(defun my-c-mode-common-hook ()
;; my customizations for all of c-mode and related modes
;; other customizations can go here
(setq c-default-style "bsd")
(setq c-basic-offset 4)
(setq indent-tabs-mode nil)
)
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
Any help would be appreciated.
任何帮助,将不胜感激。
1 个解决方案