Emacs 31.1 で mew-addrstr-parse-syntax-list1 が動作しなくなりそう

11 views
Skip to first unread message

Yoshiaki Kasahara

unread,
Sep 2, 2025, 4:23:32 AM (4 days ago) Sep 2
to mew...@googlegroups.com
笠原です。

現在 31.1 に向けて開発中の Emacs 31.0.50 で string mutation について制
限が厳しくなり、multibyte string への非 ASCII 文字の aset ができなくなっ
たため、mew-addrstr-parse-syntax-list1 で対象文字列に非ASCII文字が含ま
れていると "Attempt to store non-ASCII char into multibyte string" エ
ラーになるようになりました。以下は etc/NEWS の該当項目です。

* Incompatible Lisp Changes in Emacs 31.1
+++
** String mutation has been restricted further.
'aset' on unibyte strings now requires the new character to be a single
byte (0-255). On multibyte strings the new character and the character
being replaced must both be ASCII (0-127).

These rules ensure that mutation will never transform a unibyte string
to multibyte, and that the size of a string in bytes (as reported by
'string-bytes') never changes. They also allow strings to be
represented more efficiently in the future.

Other functions that use 'aset' to modify string data, such as
'subst-char-in-string' with a non-nil INPLACE argument, will signal an
error if called with arguments that would violate these rules.

do-copy で一文字ずつ tmp に aset している所だと思います。
自分は elisp 力が足りず修正できないので、報告のみですみません。
--
笠原 義晃

Kazu Yamamoto

unread,
Sep 2, 2025, 6:08:27 AM (4 days ago) Sep 2
to yka...@gmail.com, mew...@googlegroups.com
山本です。

> 現在 31.1 に向けて開発中の Emacs 31.0.50 で string mutation について制
> 限が厳しくなり、multibyte string への非 ASCII 文字の aset ができなくなっ
> たため、mew-addrstr-parse-syntax-list1 で対象文字列に非ASCII文字が含ま
> れていると "Attempt to store non-ASCII char into multibyte string" エ
> ラーになるようになりました。以下は etc/NEWS の該当項目です。

重い腰を上げて、Emacs 30.2 をインストールしました。
Emacs 30.2 で出る警告を無くしてから、31 を試してみます。

--かず


Kazu Yamamoto

unread,
Sep 3, 2025, 10:40:56 PM (2 days ago) Sep 3
to mew...@googlegroups.com
> 重い腰を上げて、Emacs 30.2 をインストールしました。
> Emacs 30.2 で出る警告を無くしてから、31 を試してみます。

Emacs 31 の aset 関数の仕様が意味不明ですが、文字列を直接 aset で変更
するのではなく、新たに「文字のリスト」を作成して、string で文字列に変
換する方法を思い付いたので、実装してみました。emacs-31 ブランチで試せ
ます。

ただ、aset は、他にもたくさん使われているので、他でもエラーが発生する
と思われます。

--かず


Yoshiaki Kasahara

unread,
Sep 4, 2025, 6:01:36 AM (yesterday) Sep 4
to mew...@googlegroups.com
On Thu, 04 Sep 2025 11:40:47 +0900 (JST),
'Kazu Yamamoto' via Mew ユーザ <mew...@googlegroups.com> said:

>> 重い腰を上げて、Emacs 30.2 をインストールしました。
>> Emacs 30.2 で出る警告を無くしてから、31 を試してみます。
>
> Emacs 31 の aset 関数の仕様が意味不明ですが、文字列を直接 aset で変更
> するのではなく、新たに「文字のリスト」を作成して、string で文字列に変
> 換する方法を思い付いたので、実装してみました。emacs-31 ブランチで試せ
> ます。

ありがとうございます。とりあえず inc すらできないという状況は脱したの
で、これでしばらく暮らしてみます(このメールは emacs-31 ブランチで書い
ています)。

> ただ、aset は、他にもたくさん使われているので、他でもエラーが発生する
> と思われます。

とりあえず今の所大丈夫そうなのですが、何か気づいたらまたお知らせします。

--
笠原

Kazu Yamamoto

unread,
Sep 4, 2025, 9:37:12 PM (24 hours ago) Sep 4
to mew...@googlegroups.com
> ありがとうございます。とりあえず inc すらできないという状況は脱したの
> で、これでしばらく暮らしてみます(このメールは emacs-31 ブランチで書い
> ています)。

master にマージしました。

> とりあえず今の所大丈夫そうなのですが、何か気づいたらまたお知らせします。

よろしくお願いします。

--かず


Reply all
Reply to author
Forward
0 new messages