summary refs log tree commit diff stats
path: root/emacs/init.el
diff options
context:
space:
mode:
authorAlan Pearce2013-10-08 21:22:57 +0100
committerAlan Pearce2013-10-08 21:22:57 +0100
commit2cb9ae76a13edbeed2240647633bc9bd13136e69 (patch)
treea13acccaf9573ef9dfef205322f7567804810d90 /emacs/init.el
parentf59f8736b8601fa96fd96ec643f1ee510653bf5f (diff)
downloadnixfiles-2cb9ae76a13edbeed2240647633bc9bd13136e69.tar.lz
nixfiles-2cb9ae76a13edbeed2240647633bc9bd13136e69.tar.zst
nixfiles-2cb9ae76a13edbeed2240647633bc9bd13136e69.zip
Emacs: remove old-style indentation function
Diffstat (limited to 'emacs/init.el')
-rw-r--r--emacs/init.el41
1 files changed, 1 insertions, 40 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 0c934fdb..b62c3085 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -1067,46 +1067,7 @@ Also returns nil if pid is nil."
                                     (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