emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 13/16] Get rid of buffer_permanent_local_flags array


From: Eli Zaretskii
Subject: Re: [PATCH v2 13/16] Get rid of buffer_permanent_local_flags array
Date: Tue, 01 Dec 2020 19:39:07 +0200

> From: Spencer Baugh <sbaugh@catern.com>
> Date: Sat, 21 Nov 2020 21:34:42 -0500
> Cc: Spencer Baugh <sbaugh@catern.com>, Arnold Noronha <arnold@tdrhq.com>,
>  Stefan Monnier <monnier@iro.umontreal.ca>, Dmitry Gutov <dgutov@yandex.ru>
> 
> This is only used in one place, for two variables; we can just special
> case those variables in the place it's used.

Is this necessary for the speedup changes?  It sounds like this is not
directly related, and if so, I'd like to leave this issue alone for
now.  One serious change at a time.

>    /* For each slot that has a default value, copy that into the slot.  */
>    FOR_EACH_PER_BUFFER_OBJECT_AT (offset)
>      {
> -      int idx = PER_BUFFER_IDX (offset);
>        if ((BUFFER_DEFAULT_VALUE_P (offset)
> -        && (permanent_too
> -            || buffer_permanent_local_flags[idx] == 0)))
> +           && (permanent_too
> +               /* Special case these two for backwards-compat; they're
> +                  flagged as permanent-locals in bindings.el, even
> +                  though they do have default values. */
> +               || (offset != PER_BUFFER_VAR_OFFSET (truncate_lines)
> +                   && offset !=
> +                   PER_BUFFER_VAR_OFFSET (buffer_file_coding_system)))))
>          KILL_PER_BUFFER_VALUE (b, offset);

In any case, I don't think we want to special-case some buffer-local
variables in this way.  It is a maintenance burden, if nothing else.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]