[Mesa-dev] [PATCH] dir-locals.el: show-trailing-whitespace and whitespace support

Ilia Mirkin imirkin at alum.mit.edu
Thu Sep 8 16:04:09 UTC 2016


On Thu, Sep 8, 2016 at 12:01 PM, Andres Gomez <agomez at igalia.com> wrote:
> On Thu, 2016-09-08 at 09:59 -0400, Ilia Mirkin wrote:
>> On Tue, Aug 2, 2016 at 12:14 PM, Andres Gomez <agomez at igalia.com> wrote:
>> > Signed-off-by: Andres Gomez <agomez at igalia.com>
>> > ---
>> >  .dir-locals.el | 9 +++++++--
>> >  1 file changed, 7 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/.dir-locals.el b/.dir-locals.el
>> > index 4b53931..9c89a63 100644
>> > --- a/.dir-locals.el
>> > +++ b/.dir-locals.el
>> > @@ -1,4 +1,5 @@
>> > -((prog-mode
>> > +((nil . ((show-trailing-whitespace . t)))
>>
>> This sounds fine to me.
>>
>> > + (prog-mode
>> >    (indent-tabs-mode . nil)
>> >    (tab-width . 8)
>> >    (c-basic-offset . 3)
>> > @@ -8,6 +9,10 @@
>> >             (c-set-offset 'case-label '0)
>> >             (c-set-offset 'innamespace '0)
>> >             (c-set-offset 'inline-open '0)))
>> > -  )
>> > +  (whitespace-style face indentation lines-tail)
>> > +  (whitespace-line-column . 79)
>> > +  (eval ignore-errors
>> > +        (require 'whitespace)
>> > +        (whitespace-mode 1)))
>>
>> What do these do? I've only ever done show-trailing-whitespace t.
>
> It will highlight malformed indentation

Malformed meaning what?

> and change color of the
> characters exceeding the line length limit (>78 chars).

Ah. I don't think that'll go over too well. I know I'd hate it at
least. My window width is 80 chars anyways, so that's a much more
obvious indicator of when to stop typing. Some lines do go over 80
though and are fine. No need to assault someone reading code...

  -ilia


More information about the mesa-dev mailing list