auctex-devel
[Top][All Lists]
Advanced

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

Re: Emacs 27 problem with :local keyword in defcustom


From: Arash Esbati
Subject: Re: Emacs 27 problem with :local keyword in defcustom
Date: Fri, 15 Mar 2024 23:57:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Keita,

Ikumi Keita <ikumi@ikumi.que.jp> writes:

> I noticed that emacs 27.1 fails with the current AUCTeX master. When I
> open circ.tex with emacs 27.1, it signals error with
> "(wrong-type-argument number-or-marker-p nil)" in `TeX-auto-parse'. The
> local values of `TeX-auto-parse-length' and `TeX-auto-x-parse-length'
> are both nil in the circ.tex buffer.
>
> It seems that it is due to introduction of :local keyword in defcustom:
> ,----
> | 77a02f837a0d32e2f7b47764d6e7f64ad76001ba
> | Author:     Arash Esbati <arash@gnu.org>
> | AuthorDate: Thu Jan 18 22:55:12 2024 +0100
> | Commit:     Arash Esbati <arash@gnu.org>
> | CommitDate: Thu Jan 18 22:55:12 2024 +0100
> | 
> | Mark options as buffer-local with the :local keyword
> `----
> As far as I can see, it is a bug of emacs 27.1. The function
> `custom-declare-variable', which is the essential part of `defcustom',
> puts the `make-variable-buffer-local' declaration _before_ the actual
> `defvar', thus ending up with inconsistent local values.

Thanks for tracking this down.  I saw this report[1] which is exactly
what you describe, but I didn't dig further since I don't have Emacs
27.1 on my HD.  This is indeed an Emacs bug which was fixed with commit
dea3d6aa18[2] and is available with Emacs 27.2.

> Hence we have to refrain from using :local in `defcustom' until we drop
> support for emacs 27 :-(

Agreed.  I will try to revert the change above ASAP, next week
hopefully.  Again, many thanks for catching this.

Best, Arash

Footnotes:
[1]  https://emacs.stackexchange.com/q/80389/12242
[2]  
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=dea3d6aa18e54f0d8d75cd219b511bac5b3c87b1



reply via email to

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