2011-03-08 02:23:04 +08:00
|
|
|
; Sets emacs variables based on mode.
|
|
|
|
; A list of (major-mode . ((var1 . value1) (var2 . value2)))
|
|
|
|
; Mode can be nil, which gives default values.
|
|
|
|
|
2018-12-06 22:45:19 +08:00
|
|
|
; Note that we set a line width of 109 for .c and XML files, but for everything
|
2016-02-10 19:27:35 +08:00
|
|
|
; else (such as journal catalog files, unit files, README files) we stick to a
|
|
|
|
; more conservative 79 characters.
|
|
|
|
|
|
|
|
; NOTE: If you update this file make sure to update .vimrc and .editorconfig,
|
|
|
|
; too.
|
|
|
|
|
2018-12-06 22:45:19 +08:00
|
|
|
((c-mode . ((fill-column . 109)
|
2016-02-10 19:27:35 +08:00
|
|
|
(c-basic-offset . 8)
|
2016-01-08 07:24:06 +08:00
|
|
|
(eval . (c-set-offset 'substatement-open 0))
|
|
|
|
(eval . (c-set-offset 'statement-case-open 0))
|
|
|
|
(eval . (c-set-offset 'case-label 0))
|
|
|
|
(eval . (c-set-offset 'arglist-intro '++))
|
2016-01-21 07:03:08 +08:00
|
|
|
(eval . (c-set-offset 'arglist-close 0))))
|
2016-02-10 19:27:35 +08:00
|
|
|
(nxml-mode . ((nxml-child-indent . 2)
|
2018-12-06 22:45:19 +08:00
|
|
|
(fill-column . 109)))
|
2017-04-25 07:40:02 +08:00
|
|
|
(meson-mode . ((meson-indent-basic . 8)))
|
|
|
|
(sh-mode . ((sh-basic-offset . 8)
|
|
|
|
(sh-indentation . 8)))
|
2018-06-20 16:59:44 +08:00
|
|
|
(awk-mode . ((c-basic-offset . 8)))
|
|
|
|
(nil . ((indent-tabs-mode . nil)
|
|
|
|
(tab-width . 8)
|
|
|
|
(fill-column . 79))) )
|