emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 0/7] Cleanups and tests for DEFVAR_PER_BUFFER variables


From: Spencer Baugh
Subject: Re: [PATCH 0/7] Cleanups and tests for DEFVAR_PER_BUFFER variables
Date: Thu, 01 Apr 2021 19:39:56 -0400

Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> To statically avoid checking Qunbound for vars where it's not necessary,
>> we need to use separate syntax for accessing BVARs that have defaults
>> and BVARs that don't have defaults. Only BVARs that have defaults need a
>> Qunbound check.  (We could use the same syntax for both, but it would
>> require X macros which Eli disliked earlier)
>
> BTW, we may also want to try and increase the proportion of those vars
> which don't have a global default (i.e. look at which variables fall
> into this camp and that can be changed without too much trouble).

For sure, that has many benefits.

I would have investigated this, but I don't know to what extent we try
to provide backwards-compatibility for this kind of thing.  If it
doesn't break any of the tests, is it probably fine?  Or if we're
concerned about breaking third-party packages, how can one judge the
risk of that?

If we could get rid of defaults from most of the variables, we could
just convert the rest into regular buffer-local variables and then
remove support for defaults in DEFVAR_PER_BUFFER entirely, which would
be a big simplification (and performance improvement).  But of course
this depends on how many variables can have their defaults removed -
since converting a variable into a regular buffer-local variable will
make its performance worse for sure.



reply via email to

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