help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Indentation with spaces


From: goncholden
Subject: Re: Indentation with spaces
Date: Wed, 08 Jun 2022 23:40:38 +0000

------- Original Message -------
On Thursday, June 9th, 2022 at 10:52 AM, Skip Montanaro 
<skip.montanaro@gmail.com> wrote:


> > When using indentation, emacs uses tabs at the front. Can spaces be used
>
> instead, and is it a good thing to do?
>
> Check the docs for indent-tabs-mode. When nil, spaces will be used instead
> of tabs.
>
> Skip Montanaro

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")))))
)





reply via email to

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