File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 35
35
(beginning-of-line )
36
36
(if (re-search-forward " [ ]*);$" endpoint t ) t nil ))))
37
37
38
+ (defun my/prev-line-call-with-no-args-p ()
39
+ " Return true if the previous line is a function call with no arguments"
40
+ (save-excursion
41
+ (let ((start (point )))
42
+ (forward-line -1 )
43
+ (if (re-search-forward " .($" start t ) t nil ))))
44
+
38
45
(defun my/arglist-cont-nonempty-indentation (arg )
39
46
(if (my/inside-java-lambda-p)
40
47
'+
50
57
51
58
(defun my/arglist-close (arg ) (if (my/trailing-paren-p) 0 '-- ))
52
59
60
+ (defun my/arglist-intro (arg )
61
+ (if (my/prev-line-call-with-no-args-p) '++ 0 ))
62
+
53
63
(c-set-offset 'inline-open 0 )
54
64
(c-set-offset 'topmost-intro-cont '+ )
55
65
(c-set-offset 'statement-block-intro 'my/statement-block-intro )
61
71
(c-set-offset 'label '+ )
62
72
(c-set-offset 'statement-case-open '+ )
63
73
(c-set-offset 'statement-cont '++ )
64
- (c-set-offset 'arglist-intro 0 )
74
+ (c-set-offset 'arglist-intro 'my/arglist-intro )
65
75
(c-set-offset 'arglist-cont-nonempty '(my/arglist-cont-nonempty-indentation c-lineup-arglist))
66
76
(c-set-offset 'arglist-close 'my/arglist-close )
67
77
(c-set-offset 'inexpr-class 0 )
You can’t perform that action at this time.
0 commit comments