[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How about a non-nil and non-t value of show-trailing-whitespa ce?
From: |
Eli Zaretskii |
Subject: |
Re: How about a non-nil and non-t value of show-trailing-whitespa ce? |
Date: |
Mon, 30 Jul 2001 14:24:41 -0400 |
> From: "Marshall, Simon" <address@hidden>
> Date: Mon, 30 Jul 2001 17:36:27 +0100
> >
> > Here's my solution to this issue (from my .emacs):
> >
> > ;;; Turn on trailing whitespace highlighting in modes where
> > ;;; it makes sense.
> > (let* ((twh-modes '("texinfo-mode" "makefile-mode" "c-mode-common"
> > "emacs-lisp-mode" "outline-mode" "sh-mode"
> > "shell-script-mode"))
> > (elt (car twh-modes)))
> > (while elt
> > (add-hook (intern (concat elt "-hook"))
> > (function (lambda ()
> > (setq show-trailing-whitespace t))))
> > (setq twh-modes (cdr twh-modes)
> > elt (car twh-modes))))
>
> We know how to do this
I'm sure you do; I merely meant to demonstrate that someone might want
to turn the feature only in some modes.
> I admit that my suggestion is also arbitrary (why not restrict it to
> writable file-visiting buffers, rather than writable buffers?) but it's
> worth thinking about.
I agree that we should think and talk about adding more features to
allow users to turn trailing whitespace selectively in an easy way.