From: rearman Date: Wed, 1 Mar 2023 13:58:18 +0000 (-0500) Subject: Add hooks to set tab-width,etc for c/lisp/elisp modes X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=11b81a9103f4a9bdd71419631836864573735841;p=emacsinit.git Add hooks to set tab-width,etc for c/lisp/elisp modes --- 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)