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

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

Re: whitespace-mode highlighting colour


From: Emanuel Berg
Subject: Re: whitespace-mode highlighting colour
Date: Mon, 04 Jan 2021 12:27:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

michael-franzese wrote:

> I want the highlight tabs and trailing spaces. You say that
> the variable is obsolete.
> How would be best to tackle the task.

I guess it means one should use the face, not the variable.

I do this so I don't have to bother with trailing whitespace or
tabs. Maybe one can configure that in an easier way, because
it feels like a basic thing to do.

(defun untab-all ()
  (unless (member major-mode '(makefile-gmake-mode
                               makefile-mode) ) ; exceptions
    (untabify (point-min) (point-max)))
  nil) ; tell "did not write buffer to disk"

(setq-default tab-width 3)

(setq-default indent-tabs-mode nil)

;; (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
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




reply via email to

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