all repos — nixfiles @ 2cb9ae76a13edbeed2240647633bc9bd13136e69

System and user configuration, managed by nix and home-manager

Emacs: remove old-style indentation function

Alan Pearce
commit

2cb9ae76a13edbeed2240647633bc9bd13136e69

parent

f59f8736b8601fa96fd96ec643f1ee510653bf5f

1 file changed, 1 insertion(+), 40 deletions(-)

jump to
M emacs/init.elemacs/init.el
@@ -1067,46 +1067,7 @@ (setq c-default-style '((java-mode . "java")
(awk-mode . "awk") (other . "k&r")) c-basic-offset 4) - (c-set-offset 'case-label '+) - (c-set-offset 'arglist-cont-nonempty #'ap/c-lineup-arglist) - (defun ap/c-lineup-arglist (langelem) - "Line up the current argument line under the first argument. - -As a special case, if the indented line is inside a brace block -construct, the indentation is 0 only. This is intended -as a \"DWIM\" measure in cases like macros that contains statement -blocks, e.g: - -A_VERY_LONG_MACRO_NAME ({ - some (code, with + long, lines * in[it]); -}); -<--> c-basic-offset - -Works with: arglist-cont-nonempty, arglist-close." - (save-excursion - (let ((indent-pos (point))) - - (if (c-block-in-arglist-dwim (c-langelem-2nd-pos c-syntactic-element)) - 0 - - ;; Normal case. Indent to the token after the arglist open paren. - (goto-char (c-langelem-2nd-pos c-syntactic-element)) - (if (and c-special-brace-lists - (c-looking-at-special-brace-list)) - ;; Skip a special brace list opener like "({". - (progn (c-forward-token-2) - (forward-char)) - (forward-char)) - - (let ((arglist-content-start (point))) - (c-forward-syntactic-ws) - (when (< (point) indent-pos) - (goto-char arglist-content-start) - (skip-chars-forward " \t")) - (vector (if (or (looking-at ",") - (looking-at ")")) - (- (current-column) 2) - (current-column)))))))))) + (c-set-offset 'case-label '+))) (use-package quickrun :defer t