[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Indentation with spaces

From: Skip Montanaro
Subject: Re: Indentation with spaces
Date: Wed, 8 Jun 2022 20:57:33 -0500

> Have written the following function, but tabs and trailing spaces are not 
> being highlighted.  For some reason, hitting the tab key does not introduce a 
> tab.
> (defun indent-tabs ()
>   "TODO"
>   (setq custom-tab-width 2)
>   (setq whitespace-style '(face tabs tab-mark trailing))
>   (setq-default indent-tabs-mode nil)
>   (custom-set-faces
>      '(whitespace-tab ((t (:background "#636363")))))
> )

I'm no whiz with highlighting things. You could say I'm a face dunce.
I let the major mode do that. I'm rarely dissatisfied enough with its
settings to investigate a change in behavior. 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.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]