Subject: 31.0.50; japanese-replace-region doesn't work
From: Katsumi Yamaoka <[email-masked]>
To: [email-masked]
Cc: Stefan Monnier <[email-masked]>
Date: Mon, 31 Mar 2025 11:56:48 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

On Sat, 29 Mar 2025 17:58:51 -0400, Stefan Monnier via Mailing list for Emacs changes wrote:
> branch: master
> commit a5126f79a163192947acb18a32e199c588be7c4a
> Merge: b98fe25c2ee 6bcf41c311b
> Author: Stefan Monnier <[email-masked]>
> Commit: Stefan Monnier <[email-masked]>

>     Merge remote-tracking branch 'origin/scratch/replace-region-contents'
[...]
>  lisp/language/japan-util.el    |  43 +++++++-----

Functions that use `replace-region-contents' in japan-util.el
now do not work.  Because the 3rd argument SOURCE passed to
`replace-region-contents' may be a character, not a string, in
most cases in japan-util.el.  For instance:

(japanese-hankaku "アイウエオ")
 =>
Debugger entered--Lisp error: (wrong-type-argument (or string buffer vector) 65393)
  replace-region-contents(1 2 65393 0)
 [...]

Maybe changing `replace-region-contents' so to allow a character
as well, or wrapping the 3rd argument passed to
`replace-region-contents' with the `string' function in only
japan-util.el will be the solution.

Thanks.