Fix double indentation in java
This commit is contained in:
parent
99bf1c04fb
commit
55b718191d
1 changed files with 9 additions and 7 deletions
|
@ -68,13 +68,15 @@
|
|||
(c-set-offset 'arglist-close '0)
|
||||
|
||||
(defun +cc--c-lineup-inclass (langelem)
|
||||
(let ((inclass (assoc 'inclass c-syntactic-context)))
|
||||
(save-excursion
|
||||
(goto-char (c-langelem-pos inclass))
|
||||
(if (or (looking-at "struct")
|
||||
(looking-at "typedef struct"))
|
||||
'+
|
||||
'++))))
|
||||
(if (memq major-mode '(c-mode c++-mode))
|
||||
(let ((inclass (assq 'inclass c-syntactic-context)))
|
||||
(save-excursion
|
||||
(goto-char (c-langelem-pos inclass))
|
||||
(if (or (looking-at "struct")
|
||||
(looking-at "typedef struct"))
|
||||
'+
|
||||
'++)))
|
||||
'+))
|
||||
(c-set-offset 'inclass #'+cc--c-lineup-inclass)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue