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

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

bug#55862: Removing indent-tabs-mode set to t by default


From: Drew Adams
Subject: bug#55862: Removing indent-tabs-mode set to t by default
Date: Thu, 9 Jun 2022 16:06:20 +0000

> It is worth reconsidering the decision to stick with tabs in future.  I
> do not know of any mechanism to show (with some symbol) the beginning
> of each tab and the end of a line when space happens at the end of a
> line.

FWIW: You can use my library `highlight-chars.el'
to highlight TAB chars (or any chars) individually:

  M-x hc-highlight-chars
  TAB
  [enter the face you want for it]

Use `hc-toggle-highlight-trailing-whitespace' to
highlight trailing whitespace with a different face.

But as the code stands now, trailing whitespace
includes TAB chars.  As a quick hack you can edit
`hc-highlight-trailing-whitespace' to remove TAB
chars from the (hard-coded, so far) regexp of chars
to match:

(font-lock-add-keywords
  nil
  `(("[\u00a0\040\t]+$"   ; <===== Remove \t
     (0 'hc-trailing-whitespace
        ,hc-font-lock-override)))
  'APPEND)

https://www.emacswiki.org/emacs/ShowWhiteSpace#HighlightChars

https://www.emacswiki.org/emacs/download/highlight-chars.el

[FWIW2: I'm one of the many who think the default
 should be changed to nil.  There was a fair
 amount of discussion, but t carried the day.]  

reply via email to

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