emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 00/16] Speeding up DEFVAR_PER_BUFFER


From: Eli Zaretskii
Subject: Re: [PATCH v2 00/16] Speeding up DEFVAR_PER_BUFFER
Date: Tue, 01 Dec 2020 17:15:51 +0200

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org,  arnold@tdrhq.com,
>   dgutov@yandex.ru,  rms@gnu.org
> Date: Mon, 30 Nov 2020 17:10:20 -0500
> 
> > All this is rather confusing and inconsistent; I don't think we should
> > add more of these "pseudo-permanent" variables.
> 
> Agreed: I think we should get rid of this special category of "always
> local" variables.  This is a concept that only applies to the following
> variables:
> 
>     bset_filename (&buffer_local_flags, make_fixnum (-1));
>     bset_directory (&buffer_local_flags, make_fixnum (-1));
>     bset_backed_up (&buffer_local_flags, make_fixnum (-1));
>     bset_save_length (&buffer_local_flags, make_fixnum (-1));
>     bset_auto_save_file_name (&buffer_local_flags, make_fixnum (-1));
>     bset_read_only (&buffer_local_flags, make_fixnum (-1));
>     bset_major_mode (&buffer_local_flags, make_fixnum (-1));
>     bset_mode_name (&buffer_local_flags, make_fixnum (-1));
>     bset_undo_list (&buffer_local_flags, make_fixnum (-1));
>     bset_mark_active (&buffer_local_flags, make_fixnum (-1));
>     bset_point_before_scroll (&buffer_local_flags, make_fixnum (-1));
>     bset_file_truename (&buffer_local_flags, make_fixnum (-1));
>     bset_invisibility_spec (&buffer_local_flags, make_fixnum (-1));
>     bset_file_format (&buffer_local_flags, make_fixnum (-1));
>     bset_auto_save_file_format (&buffer_local_flags, make_fixnum (-1));
>     bset_display_count (&buffer_local_flags, make_fixnum (-1));
>     bset_display_time (&buffer_local_flags, make_fixnum (-1));
>     bset_enable_multibyte_characters (&buffer_local_flags, make_fixnum (-1));
> 
> I don't see the benefit of forcing those vars to always be buffer-local.
> We could just as well make them "normal" and they'll still have
> a buffer-local value pretty much all the time anyway.

I think that could open a can of worms, whereby fun things can happen
if some Lisp removes the local bindings from one of these variables.



reply via email to

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