emacs-devel
[Top][All Lists]
Advanced

[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-whitespace?


From: Andre Spiegel
Subject: Re: How about a non-nil and non-t value of show-trailing-whitespace?
Date: 30 Jul 2001 14:10:18 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

"Marshall, Simon" <address@hidden> writes:

> I was looking for some way to turn on show-trailing-whitespace only for
> files that are checked out of VC.
[...]
> So, I suggest that redisplay is changed so that if
> show-trailing-whitespace is non-nil and non-t, Emacs should highlight
> trailing whitespace only if buffer-read-only is t.

That feature doesn't make too much sense to me.  Suppose I want to
check whether a file has trailing white space, and if so, I want to
check the file out and remove the white space.  It doesn't seem
plausible to me to link this to buffer-read-only in any way.

Besides, the connection between buffer-read-only and the VC state of a
file is not that simple (and about to be reworked soon), especially
for files without locking.

That being said, a plausible condition for showing trailing whitespace
might be:

  (and (eq (vc-checkout-model file) 'locking)
       (eq (vc-state file) 'edited))

A vc-checkout-hook might indeed be a better way to achieve it, though,
and I think we should have one anyway, if just for symmetrical
reasons.

Is it safe to add this now, or shouldn't we wait until after 21.1?



reply via email to

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