summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/cpp.el1
-rw-r--r--lisp/mk.el1
-rw-r--r--lisp/python-custom.el9
3 files changed, 10 insertions, 1 deletions
diff --git a/lisp/cpp.el b/lisp/cpp.el
index 6dad38b..5bb04a8 100644
--- a/lisp/cpp.el
+++ b/lisp/cpp.el
@@ -12,6 +12,7 @@
(c-set-offset 'substatement-open 0)
(c-set-offset 'arglist-intro '+)
(c-set-offset 'arglist-cont-non-empty '+)
+ (c-set-offset 'argslist-close '+)
)
(add-hook 'c-mode-common-hook 'setup-c)
diff --git a/lisp/mk.el b/lisp/mk.el
index 634f09a..28de3ed 100644
--- a/lisp/mk.el
+++ b/lisp/mk.el
@@ -69,6 +69,5 @@
(other-window -1))))))
(bind-key* (kbd "C-c f r") 'mk/rename-file)
-
(provide 'mk)
;;; mk.el ends here
diff --git a/lisp/python-custom.el b/lisp/python-custom.el
index 3d076cb..1d48a6f 100644
--- a/lisp/python-custom.el
+++ b/lisp/python-custom.el
@@ -44,5 +44,14 @@
(setq python-indent-guess-indent-offset nil)
+(defun mk/python/remove_unused ()
+ "Removes unused imports"
+ (interactive)
+ (setq command (concat "autoflake --in-place --remove-unused-variables " buffer-file-name))
+ (shell-command command)
+ ;; Reload the modified file
+ (revert-buffer t t)
+ )
+
(provide 'python-custom)
;;; python-custom.el ends here