[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: buffer.c/buffer.h: How to add new buffer-local variables?
From: |
Eli Zaretskii |
Subject: |
Re: buffer.c/buffer.h: How to add new buffer-local variables? |
Date: |
Tue, 09 Apr 2019 09:13:59 +0300 |
> From: Paul Eggert <address@hidden>
> Date: Mon, 8 Apr 2019 16:06:07 -0700
>
> On 4/8/19 3:19 PM, Michael Welsh Duggan wrote:
> > I would also add a comment after the
> > cursor_in_non_selected_windows_ entry to the effect that the define
> > needs to be updated if more are added afterward.
>
> There's already a comment there to that effect, and similar comments
> near similar boundaries in other structures. A patch to regularize
> and/or clarify them would be welcome.
>
> Not sure I want to add a macro, though, as it's one more thing to
> maintain and it's not clear it's worth the hassle since one can get the
> macro wrong too.
I agree. A macro doesn't necessarily tell what it's replaced with, so
when you read code which uses the macro, you many times need to look
up that macro to understand what it hides. A comment doesn't have
this problem.
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Keith David Bershatsky, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Eli Zaretskii, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Eli Zaretskii, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Andreas Schwab, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Eli Zaretskii, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Stefan Monnier, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Paul Eggert, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Michael Welsh Duggan, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Paul Eggert, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?,
Eli Zaretskii <=