[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 11/16] Assert that PER_BUFFER_IDX for Lisp variables is no
From: |
Eli Zaretskii |
Subject: |
Re: [PATCH v2 11/16] Assert that PER_BUFFER_IDX for Lisp variables is not 0 |
Date: |
Tue, 01 Dec 2020 19:32:07 +0200 |
> From: Spencer Baugh <sbaugh@catern.com>
> Date: Sat, 21 Nov 2020 21:34:40 -0500
> Cc: Spencer Baugh <sbaugh@catern.com>, Arnold Noronha <arnold@tdrhq.com>,
> Stefan Monnier <monnier@iro.umontreal.ca>, Dmitry Gutov <dgutov@yandex.ru>
>
> PER_BUFFER_IDX can't be 0 for Lisp variables - so this if-check was
> always pointless.
This is again a cleanup not directly related to the main issue.
> if (BUFFER_OBJFWDP (valcontents))
> {
> int offset = XBUFFER_OBJFWD (valcontents)->offset;
> - if (PER_BUFFER_IDX (offset) != 0)
> - return per_buffer_default (offset);
> + eassert (PER_BUFFER_IDX (offset) != 0);
> + return per_buffer_default (offset);
Btw, it looks like your setting of indent-tabs-mode is different from
the default, because above you change the indentation of the 'return'
line to be all-spaces. This is not our style, we use non-nil
indent-tabs-mode in C sources (but not in Lisp, see .dir-locals.el).
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v2 11/16] Assert that PER_BUFFER_IDX for Lisp variables is not 0,
Eli Zaretskii <=