GNU bug report logs - #13837
24.2; Make it possible to turn whitespace-mode only when there are no existing problems

Previous Next

Package: emacs;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Wed, 27 Feb 2013 21:45:02 UTC

Severity: wishlist

Found in version 24.2

Fixed in version 25.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #65 received at 13837 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: 13837 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#13837: 24.2;
 Make it possible to turn whitespace-mode only when there are no
 existing problems
Date: Mon, 27 Jan 2014 10:00:30 -0500
>> But it's not obviously safe to me.  Two non-obvious parts are:
>> - the removal of "(add-to-list 'whitespace-style (car option))".
> The removal looks wrong to me too: without that code, the force argument
> has no effect.  On the other hand, the way it's implemented also seems
> wrong, as it permanently changes whitespace-style.

Agreed on both aspects.

>> - the change from has-bogus to bogus-list, where bogus-list will
>> (initially) only be nil if whitespace-report-list is nil.
> As far as I can see, has-bogus was set whenever an element was added to
> bogus-list.

The way I read the code bogus-list is a list of booleans (either nil or
t), returned by `mapcar', so it has as many elements as
whitespace-report-list.  IOW an element was/is added to bogus-list
regardless if a test succeeds/fails.

> 1. I would like to refactor the description of whitespace problems in
> whitespace-report-region to move those which are the same regardless of the
> value of indent-tabs-mode into a separate list.

Fine.

> 2. Since we're no longer going for getting this into 24.4, can we fold your
> "artificial" whitespace--report-report-region back into
> whitespace-report-region, which both simplifies the end result slightly,
> and avoids the question of whether the new function should be moved down
> into "internal functions"?

Of course,


        Stefan




This bug report was last modified 10 years and 235 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.