]> git.earman.xyz Git - emacsinit.git/commitdiff
Add hooks to set tab-width,etc for c/lisp/elisp modes
authorrearman <rearman@r717.net>
Wed, 1 Mar 2023 13:58:18 +0000 (08:58 -0500)
committerrearman <rearman@r717.net>
Wed, 1 Mar 2023 13:58:18 +0000 (08:58 -0500)
hooks-puts.el

index 2a57b02683700279ba4b3631a21602e9260e96e9..849207b9bc424c388314ab62d26ebc1eb25e67c5 100644 (file)
@@ -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)