[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Indentation with spaces
From: |
goncholden |
Subject: |
Re: Indentation with spaces |
Date: |
Thu, 09 Jun 2022 03:12:06 +0000 |
------- Original Message -------
On Thursday, June 9th, 2022 at 3:08 PM, Emanuel Berg <incal@dataswamp.org>
wrote:
> Skip Montanaro wrote:
>
> > As for TAB not inserting a literal TAB character,
> > indentation is controlled by the major mode. I believe that
> > for ELisp, the default indentation is just two spaces.
> > (Don't quote me on that though.)
>
>
> Why is `indent-tabs-mode' t by default? Tabs should not
> be used.
I agree and found it very annoying. Could one request a change?
> Anyway here is how I do it:
>
> ;;; -- lexical-binding: t --
> ;;
> ;; this file:
> ;; https://dataswamp.org/~incal/emacs-init/tabs.el
>
> (defun untab-all ()
> (unless (member major-mode '(makefile-gmake-mode
> makefile-mode) ) ; exceptions
> (untabify (point-min) (point-max)))
> nil) ; "did not write buffer to disk"
>
> (setq-default tab-width 3)
>
> (setq-default indent-tabs-mode nil)
>
> (provide 'tabs)
>
> And then
>
> ;; (setq before-save-hook nil)
> (defun before-save-hook-f ()
> (untab-all)
> (delete-trailing-whitespace) )
> (add-hook 'before-save-hook #'before-save-hook-f)
>
> --
> underground experts united
> https://dataswamp.org/~incal
- Indentation with spaces, goncholden, 2022/06/08
- Re: Indentation with spaces, Skip Montanaro, 2022/06/08
- Re: Indentation with spaces, goncholden, 2022/06/08
- Re: Indentation with spaces, Skip Montanaro, 2022/06/08
- Re: Indentation with spaces, Emanuel Berg, 2022/06/08
- Re: Indentation with spaces,
goncholden <=
- Re: Indentation with spaces, Emanuel Berg, 2022/06/08
- Re: Indentation with spaces, goncholden, 2022/06/09
- Re: Indentation with spaces, Emanuel Berg, 2022/06/10
- Re: Indentation with spaces, Skip Montanaro, 2022/06/09
- Re: Indentation with spaces, goncholden, 2022/06/09
- Re: Indentation with spaces, Lele Gaifax, 2022/06/09
- Re: Indentation with spaces, Emanuel Berg, 2022/06/10
- Re: Indentation with spaces, Emanuel Berg, 2022/06/10
- Re: Indentation with spaces, goncholden, 2022/06/10
- Re: Indentation with spaces, Christopher Dimech, 2022/06/11