another attempt at fixing mixed tabs and spaces

This commit is contained in:
Grigory Shipunov 2020-10-10 01:54:34 +02:00
parent 8d58233973
commit f03959d76e
No known key found for this signature in database
GPG key ID: 77BB6C3E4771EE7C

11
init.el
View file

@ -74,6 +74,9 @@
(straight-use-package 'smart-tabs-mode) (straight-use-package 'smart-tabs-mode)
(smart-tabs-insinuate 'c 'c++) (smart-tabs-insinuate 'c 'c++)
;; radical way to fix emacs mixing tabs and spaces
(setq-default ident-tabs-mode nil)
;;helper functions to switch tab expansion on and off ;;helper functions to switch tab expansion on and off
(defun tabs-yay () (defun tabs-yay ()
"Function to enable tab indentation in buffer." "Function to enable tab indentation in buffer."
@ -86,13 +89,7 @@
;; wasteland of hooks regarding tabs behavior Remember how it "Just ;; wasteland of hooks regarding tabs behavior Remember how it "Just
;; worked"™ in vim? That's what you pay with for org mode ;; worked"™ in vim? That's what you pay with for org mode
;; yays: (need to make a list or something) ;; yays: (need to make a list or something)
(add-hook 'prog-mode-hook 'tabs-yay) (add-hook 'cc-mode-hook 'tabs-yay)
;; nays
(add-hook 'lisp-mode-hook 'tabs-nay)
(add-hook 'scheme-mode-hook 'tabs-nay)
(add-hook 'emacs-lisp-mode-hook 'tabs-nay)
(add-hook 'nix-mode-hook 'tabs-nay)
;; time to throw out this "DocView" abomination: full featured pdf ;; time to throw out this "DocView" abomination: full featured pdf
;; viewer of antiquity, that emacs uses today! ;; viewer of antiquity, that emacs uses today!