[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#48264: [PATCH v3 12/15] Set buffer_defaults fields without a default
From: |
Eli Zaretskii |
Subject: |
bug#48264: [PATCH v3 12/15] Set buffer_defaults fields without a default to Qunbound |
Date: |
Fri, 07 May 2021 13:42:36 +0300 |
> From: Spencer Baugh <sbaugh@catern.com>
> Date: Thu, 6 May 2021 17:33:43 -0400
> Cc: Spencer Baugh <sbaugh@catern.com>
>
> * src/buffer.h (BUFFER_DEFAULT_VALUE_P):
> Check if field is Qunbound to determine if there's a default.
This should be filled with fill-paragraph.
> @@ -54,7 +54,8 @@ along with GNU Emacs. If not, see
> <https://www.gnu.org/licenses/>. */
> defined with DEFVAR_PER_BUFFER, that have special slots in each buffer.
> The default value occupies the same slot in this structure
> as an individual buffer's value occupies in that buffer.
> -*/
> + Slots in this structure which are set to Qunbound are permanently
> + buffer-local. */
^^
Two spaces after the period that ends a sentence, please.
> @@ -5252,6 +5253,15 @@ init_buffer_once (void)
>
> /* Set up the default values of various buffer slots. */
> /* Must do these before making the first buffer! */
> + int offset;
> + FOR_EACH_PER_BUFFER_OBJECT_AT (offset)
> + {
> + /* These are initialized before us. */
^^
Typo: should be "use". Also, please leave two spaces after the
period.
> + if (!(offset == PER_BUFFER_VAR_OFFSET (syntax_table)
> + || offset == PER_BUFFER_VAR_OFFSET (category_table)))
Please add a comment here about these two exemptions. (And I cannot
say that I like such kludges; why doe we need it?)
> + /* Sanity check that we didn't set the default for slots which
> + are permanent-buffer-locals. */
^^
Two spaces again.
> --- a/src/buffer.h
> +++ b/src/buffer.h
> @@ -1102,7 +1102,8 @@ BUFFER_CHECK_INDIRECTION (struct buffer *b)
> that have special slots in each buffer.
> The default value occupies the same slot in this structure
> as an individual buffer's value occupies in that buffer.
> -*/
> + Slots in this structure which are set to Qunbound are permanently
> + buffer-local. */
^^
And again.
- bug#48264: [PATCH v3 03/15] Add and use BUFFER_DEFAULT_VALUE_P, (continued)
- bug#48264: [PATCH v3 06/15] Rearrange set_internal for buffer forwarded symbols, Spencer Baugh, 2021/05/06
- bug#48264: [PATCH v3 12/15] Set buffer_defaults fields without a default to Qunbound, Spencer Baugh, 2021/05/06
- bug#48264: [PATCH v3 12/15] Set buffer_defaults fields without a default to Qunbound,
Eli Zaretskii <=
- bug#48264: [PATCH v3 12/15] Set buffer_defaults fields without a default to Qunbound, Spencer Baugh, 2021/05/07
- bug#48264: [PATCH v3 12/15] Set buffer_defaults fields without a default to Qunbound, Eli Zaretskii, 2021/05/07
- bug#48264: [PATCH v3 12/15] Set buffer_defaults fields without a default to Qunbound, Spencer Baugh, 2021/05/07
- bug#48264: [PATCH v3 12/15] Set buffer_defaults fields without a default to Qunbound, Eli Zaretskii, 2021/05/07
- bug#48264: [PATCH v3 12/15] Set buffer_defaults fields without a default to Qunbound, Spencer Baugh, 2021/05/07
- bug#48264: [PATCH v3 12/15] Set buffer_defaults fields without a default to Qunbound, Eli Zaretskii, 2021/05/08
- bug#48264: [PATCH v3 12/15] Set buffer_defaults fields without a default to Qunbound, Spencer Baugh, 2021/05/08
bug#48264: [PATCH v3 09/15] Remove unnecessary Qunbound check, Spencer Baugh, 2021/05/06
bug#48264: [PATCH v3 07/15] Add BVAR_OR_DEFAULT macro as a stub, Spencer Baugh, 2021/05/06