(add-hook 'c-mode-hook (lambda () (require 're-c-style)))
\f
;; Tabs
-(setq-default indent-tabs-mode t
+(setq-default indent-tabs-mode 'only
tab-width 8)
+(advice-add 'indent-to :around
+ (lambda (orig-fun column &rest args)
+ (when (eq indent-tabs-mode 'only)
+ (setq column (* tab-width (round column tab-width))))
+ (apply orig-fun column args)))
+
+(setq whitespace-style '(face
+ tabs
+ spaces
+ trailing
+ lines
+ space-before-tab
+ newline
+ indentation::tab
+ empty
+ space-after-tab
+ space-mark
+ tab-mark
+ newline-mark
+ missing-newline-at-eof))
+
(defvaralias 'c-basic-offset 'tab-width)
(defvaralias 'cperl-indent-level 'tab-width)
+(defvaralias 'LaTeX-indent-level 'tab-width)
(add-hook 'prog-mode-hook
(lambda () (keymap-local-set "<TAB>" #'self-insert-command)))
(add-hook 'text-mode-hook
(lambda ()
(keymap-set text-mode-map "<TAB>" #'self-insert-command)))
+(add-hook 'LaTeX-mode
+ (lambda ()
+ (keymap-set LaTeX-mode-map "<TAB>" #'self-insert-command)))
\f
;; Buffer dealiĆ
(setq-default indicate-empty-lines t
LaTeX-mode-hook))
(dolist (hook *re/vlm-hooks*)
- (add-hook hook #'visual-line-mode))
+ (lambda ()
+ (add-hook hook #'visual-line-mode)
+ (setq indent-line-function 'tab-to-tab-stop)))
(add-to-list 'display-buffer-alist
'("^\\*eldoc" display-buffer-in-direction