From 11b81a9103f4a9bdd71419631836864573735841 Mon Sep 17 00:00:00 2001 From: rearman Date: Wed, 1 Mar 2023 08:58:18 -0500 Subject: [PATCH] Add hooks to set tab-width,etc for c/lisp/elisp modes --- hooks-puts.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hooks-puts.el b/hooks-puts.el index 2a57b02..849207b 100644 --- a/hooks-puts.el +++ b/hooks-puts.el @@ -2,6 +2,15 @@ ;; HOOKS (add-hook 'before-save-hook 'whitespace-cleanup) (add-hook 'dired-mode-hook 'dired-hide-details-mode t) +(add-hook 'lisp-mode-hook (lambda () (setq tab-width 2))) +(add-hook 'emacs-lisp-mode-hook (lambda () (setq tab-width 2))) +(add-hook 'c-mode-common-hook (lambda () + (c-set-style "k&r") + (setq tab-width 5 + c-basic-offset 5 + indent-tabs-mode t + comment-column 48))) + ;; PUTS AND PUSHES (put 'upcase-region 'disabled nil) -- 2.39.5