GNU bug report logs -
#48264
28.0.50; Changing the default for DEFVAR_PER_BUFFER variables takes O(#buffers) time
Previous Next
Full log
View this message in rfc822 format
> From: Spencer Baugh <sbaugh <at> catern.com>
> Date: Thu, 6 May 2021 17:33:43 -0400
> Cc: Spencer Baugh <sbaugh <at> 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.
This bug report was last modified 2 years and 289 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.