pkg/60650: inputmethod/anthy-elisp: accept emacs29 through emacs31, and fix six removed Emacs names

"[email protected] via gnats" <[email protected]>
Newsgroups gmane.os.netbsd.devel.pkgsrc.bugs
Message-ID <[email protected]>
>Number:         60650
>Category:       pkg
>Synopsis:       inputmethod/anthy-elisp: accept emacs29 through emacs31, and fix six removed Emacs names
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 26 17:55:00 +0000 2026
>Originator:     Showta Ishizaki
>Release:        NetBSD 11.0, pkgsrc CVS as of 2026-08-27
>Organization:
>Environment:
System: NetBSD 11.0 amd64
Architecture: x86_64
Machine: amd64
>Description:
	inputmethod/anthy-elisp only accepts emacs21, emacs20 and XEmacs:

	  EMACS_VERSIONS_ACCEPTED= emacs21 emacs21nox emacs20 \
	                           xemacs215 xemacs215nox xemacs214 xemacs214nox

	so on a machine with a current Emacs it stops in can-be-built-here.mk.

	That line is not old.  It was added in rev 1.14 (2024-05-08, wiz):

	    anthy-elisp: restrict emacs versions

	    Since I don't know better, restrict it to the versions that were
	    available at the time of the packaged version of this software
	    (2009).

	Before 1.14 the package had no EMACS_VERSIONS_ACCEPTED at all and took
	whatever was installed.  So the restriction was a guess made in the
	absence of a test, and this PR is the test.

	It matters because anthy-elisp is all but the only package that
	installs anthy.el -- the only other one in the tree is
	inputmethod/tamago-tsunagi, which ships its own.  An init file that
	does

	  (load-library "anthy")
	  (setq default-input-method 'japanese-anthy)

	has no other way to work through pkgsrc.

	Widening the list is not enough on its own.  anthy.el and anthy-dic.el
	use five names that Emacs has since removed.  Only one of them stops
	the build.  The others let the package install and then fail in use,
	which is the more troublesome kind.

	The one that stops the build is at top level, anthy.el line 74:

	  (set-face-underline-p 'anthy-highlight-face t)

	set-face-underline-p became an alias for set-face-underline in Emacs
	24.3 and was removed in Emacs 29.  Because the call is at top level,
	loading anthy.el on Emacs 29 or 30 signals an error, so
	anthy-isearch.el and anthy-kyuri.el fail to byte-compile -- both do
	nothing but (require 'anthy) at the line the compiler names -- and the
	build ends with

	  ERROR: The following files are in the PLIST but not in .../usr/pkg:
	  ERROR:         .../share/emacs/site-lisp/anthy/anthy-isearch.elc
	  ERROR:         .../share/emacs/site-lisp/anthy/anthy-kyuri.elc

	The remaining four are inside functions, so byte compilation only
	warns about an unknown function or a free variable, every .elc is
	produced, and the PLIST matches:

	  anthy.el:748       process-kill-without-query
	  anthy.el:877       inactivate-input-method
	  anthy.el:895       last-command-char
	  anthy-dic.el:73,116  string-to-int

	process-kill-without-query is the one that matters most, and it is the
	earliest.  It was obsoleted by set-process-query-on-exit-flag in Emacs
	22.1 and removed in Emacs 27 -- NEWS.27, under "Some functions and
	variables obsolete since Emacs 22 have been removed".  It sits in
	anthy-check-agent, which is what anthy-do-send-recv-command calls to
	start anthy-agent.  So from Emacs 27 the package builds cleanly and
	then dies on the first conversion request -- that is, the first time
	the input method is used at all.

	This is why the practical answer is Emacs 27, not 29.  On 27 and 28
	nothing looks wrong: the package builds, all six .elc files are there,
	an init file loads without a word, and default-input-method is set.
	The failure arrives when the user types.

	inactivate-input-method was renamed deactivate-input-method in Emacs
	24.3 and the old name was removed in Emacs 29 -- NEWS.29, under "Some
	functions and variables obsolete since Emacs 24 have been removed",
	which lists 'inactivate-current-input-method-function' and
	'inactivate-input-method' alongside 'set-face-underline-p'.  It is
	called from anthy-leim-exit-from-minibuffer, which goes on
	minibuffer-exit-hook while anthy is active in the minibuffer.

	last-command-char was removed in Emacs 24 -- NEWS.24, under "Some
	obsolete functions, variables, and faces have been removed", lists
	'last-input-char', 'last-command-char' and 'unread-command-char'.
	anthy.el has its own compatibility shim for this, anthy-last-command-char,
	and it already uses last-command-event on the XEmacs branch; only the
	GNU Emacs branch was left behind.

	string-to-int was removed in Emacs 26.  It is only reached from the
	dictionary-registration commands, so it is the least urgent of the
	five, but it is the same kind of thing.

	There is a sixth name, and it is the one a user actually notices.
	anthy-leim-activate assigns to inactivate-current-input-method-function
	(anthy.el line 867), renamed deactivate-current-input-method-function in
	Emacs 24.3.  While the obsolete alias was there, assigning to the old
	name still reached the new one and nothing was wrong.  NEWS.29 removed
	the alias.  From Emacs 29 the assignment goes nowhere,
	deactivate-current-input-method-function stays nil, and switching the
	input method off runs into

	  Symbol's function definition is void: nil
	    nil()
	    deactivate-input-method()

	Conversion works.  C-\ does not.  Measured on NetBSD 11.0/amd64 with
	everything else patched and line 867 deliberately left alone:

	  emacs26  26.3   converts, deactivates
	  emacs27  27.2   converts, deactivates
	  emacs28  28.2   converts, deactivates
	  emacs29  29.4   converts, void-function nil
	  emacs30  30.2   converts, void-function nil
	  emacs31  31.1   converts, void-function nil

	The boundary is exactly Emacs 29.  It is worth spelling out because it
	is what someone reaches after fixing only the names that stop the
	build: the package compiles, Japanese input works, and there is no way
	back out of it.

	The old backquote syntax anthy.el also used is not part of this.
	patch-anthy.el (rev 1.1, 2023-09-06, msaitoh) already deals with it,
	and the patch here is written against the tree with that applied.
	That commit's log reads

	    anthy: Don't use old style backquote to unbreak anthy-elisp build.

	so this PR is not a new idea so much as the rest of that one.  Removing
	the backquote got anthy-elisp through the reader; these five names are
	what was still in the way.

	This is not a novel diagnosis.  Three other projects reached it first.

	OpenBSD ports carries inputmethods/anthy with an emacs-anthy
	subpackage, and patches/patch-src-util_anthy_el makes the same
	substitutions this patch does -- set-face-underline, the backquote,
	set-process-query-on-exit-flag, deactivate-current-input-method-function,
	deactivate-input-method, last-command-event -- with
	patch-src-util_anthy-dic_el doing string-to-number in the same two
	places.  They rename outright where this patch guards, because they
	ship one Emacs and pkgsrc keeps emacs20, emacs21 and XEmacs in the
	accepted list.  Their history is worth quoting, because it is the same
	boundary from the other side:

	    2020-08-24  jca      Unbreak anthy.el with emacs-27.1
	    2020-11-09  yasuoka  Fix anthy.el not to use process-kill-without-query
	                         which is deleted.
	    2023-10-03  yasuoka  Fix anthy.el not not use a deleted function.
	    2023-10-04  yasuoka  Fix emacs-anthy again.  Replace functions which
	                         are deleted at emacs

	Emacs 27.1, in August 2020.  Their REVISION-emacs is at 9.

	Their patch cannot simply be copied here, and it is worth showing why
	rather than asserting it.  Applying OpenBSD's two patches to the same
	tree and running the same check:

	                    this patch (guarded)   OpenBSD's (renamed)
	  emacs20  20.7     6/6, converts          4/6, build fails
	  emacs21  21.4     6/6, converts          6/6, conversion fails
	  emacs26  26.3     6/6, converts          6/6, converts
	  emacs27  27.2     6/6, converts          6/6, converts
	  emacs28  28.2     6/6, converts          6/6, converts
	  emacs29  29.4     6/6, converts          6/6, converts
	  emacs30  30.2     6/6, converts          6/6, converts

	On emacs20 set-face-underline does not exist yet, so the top-level call
	fails and two .elc files go missing -- the same PLIST mismatch as
	before, from the other end.  On emacs21 it builds and then dies in
	anthy-check-agent:

	  Debugger entered--Lisp error: (void-function set-process-query-on-exit-flag)
	    set-process-query-on-exit-flag(#<process anthy-agent> nil)
	    anthy-check-agent()
	    anthy-do-send-recv-command(" SELECT_CONTEXT 1\n")
	    anthy-send-recv-command("n\n")
	    anthy-handle-normal-key("n")

	which is the mirror image of what unpatched anthy does on Emacs 27:
	same function, same kind of failure, opposite direction.
	set-process-query-on-exit-flag arrived in Emacs 22.  OpenBSD can rename
	because it ships one Emacs; pkgsrc cannot while emacs20, emacs21 and
	XEmacs stay in EMACS_VERSIONS_ACCEPTED.  Hence fboundp and boundp.

	anthy-unicode, the fork that is still maintained
	(https://github.com/fujiwarat/anthy-unicode, last commit 2026-08), has
	made exactly these same changes in its own copy of the file and no
	others.

	FreeBSD and Debian took the other road and dropped anthy 9100h
	entirely: FreeBSD ports has japanese/anthy-unicode and no
	japanese/anthy, and Debian's anthy source package went from 9100h-24
	to 1:0.4-3, the epoch marking the switch to anthy-unicode.

	That leaves pkgsrc and Gentoo as the two places still shipping 9100h's
	anthy.el unpatched -- Gentoo's app-i18n/anthy builds the elisp under
	USE=emacs with only a C patch applied.  So the choice here is between
	carrying the patch, as OpenBSD does, or following FreeBSD and Debian to
	anthy-unicode.  Either answers this PR; doing neither is the state we
	are in.

>How-To-Repeat:
	The build stopping in can-be-built-here.mk:

	  cd /usr/pkgsrc/inputmethod/anthy-elisp
	  make EMACS_TYPE=emacs30nox

	  ERROR: [can-be-built-here.mk] This package has PKG_FAIL_REASON set:
	  ERROR: Accepted versions are: emacs21 emacs21nox emacs20 xemacs215 xemacs215nox xemacs214 xemacs214nox
	  ERROR: No valid Emacs version installed found

	EMACS_TYPE has to go on the command line rather than in the
	environment; if mk.conf sets it, the environment does not win.

	With EMACS_VERSIONS_ACCEPTED widened but no patch, the build gets
	further and stops on the two missing .elc files quoted above.

	With set-face-underline-p guarded but nothing else, the package builds
	and installs.  Then, with anthy-agent on PATH:

	  emacs -Q --batch \
	    --eval '(add-to-list (quote load-path) "/usr/pkg/share/emacs/site-lisp/anthy")' \
	    --eval '(load-library "anthy")' \
	    --eval '(progn (anthy-mode-on) (anthy-check-agent))'

	  Symbol's function definition is void: process-kill-without-query

>Fix:
	EMACS_VERSIONS_ACCEPTED gains emacs29, emacs30 and emacs31.  With the
	emacs20, emacs21 and XEmacs entries already there, the list then names
	every Emacs editors/emacs/modules.mk knows about.

	The measurements below cover emacs26, emacs27 and emacs28 as well,
	because they were taken before those three were removed from pkgsrc
	this month.  They are left in because they are what dates the
	breakage, not because the versions still need accepting.

	patch-src-util_anthy.el guards four of the five sites in anthy.el with
	fboundp or boundp and renames last-command-char outright;
	patch-src-util_anthy-dic.el renames string-to-int.
	Guards rather than plain renames, because emacs20, emacs21 and the
	XEmacs versions that stay in EMACS_VERSIONS_ACCEPTED do not have the
	new names.  string-to-number is the exception -- it has existed since
	Emacs 20 and in XEmacs 20 -- so that one is renamed outright.

	anthy itself has not been released since 2009, so there is nowhere to
	send these upstream.  anthy-unicode is where the code went, and it
	already carries the equivalent changes; if pkgsrc would rather follow
	that than patch 9100h, that is a reasonable answer to this PR too.

	The patches go in inputmethod/anthy/patches because anthy-elisp shares
	PATCHDIR and DISTINFO_FILE with inputmethod/anthy.  They sort after the
	existing patch-anthy.el and touch different parts of the file.
	inputmethod/anthy installs no .el files of its own, so its PKGREVISION
	is left alone; anthy-elisp's goes to 7.

	Built on NetBSD 9.4, 10.1 and 11.0 (i386, under qemu) against pkgsrc
	trunk fa7ad771c96929bf742033e6ccfd8bb45b9cab49 with
	EMACS_TYPE=emacs30nox.  anthy-elisp-9100hnb7 builds on all three, with
	all six .elc files present.

	Since the point of the patch is that byte compilation does not catch
	the problem, building was not treated as enough.  Every Emacs in
	EMACS_VERSIONS_ACCEPTED that pkgsrc packages was run against both
	trees, on NetBSD 9.4/i386, using the official binary packages.  Each
	run byte-compiles the six .el files, then starts emacs, types
	"nihongo" through anthy-insert, converts with space, commits with
	return, writes the buffer out and greps it for 日本語.

	                    without the patch        with the patch
	  emacs20  20.7     6/6  converts           6/6  converts
	  emacs21  21.4     6/6  converts           6/6  converts
	  emacs26  26.3     6/6  last-command-char  6/6  converts
	  emacs27  27.2     6/6  last-command-char  6/6  converts
	  emacs28  28.2     6/6  last-command-char  6/6  converts
	  emacs29  29.4     4/6  set-face-underline-p   6/6  converts
	  emacs30  30.2     4/6  set-face-underline-p   6/6  converts
	  xemacs214 21.4.25 6/6  (not exercised)    6/6  (not exercised)

	emacs20 and emacs21 still convert with the patch applied, which is
	what the fboundp and boundp guards are for -- widening the list must
	not cost the versions that already worked.

	The same check was repeated on NetBSD 11.0/amd64 with emacs31 added,
	and extended to go back out again: activate-input-method
	"japanese-anthy", type and convert, then deactivate-input-method, and
	read both current-input-method and anthy's own anthy-leim-active-p.

	                    without the patch        with the patch
	  emacs20  20.7     converts, deactivates    converts, deactivates
	  emacs21  21.4     converts, deactivates    converts, deactivates
	  emacs26  26.3     6/6, last-command-char   converts, deactivates
	  emacs27  27.2     6/6, void function       converts, deactivates
	  emacs28  28.2     6/6, void function       converts, deactivates
	  emacs29  29.4     4/6                      converts, deactivates
	  emacs30  30.2     4/6                      converts, deactivates
	  emacs31  31.1     4/6                      converts, deactivates

	Getting emacs20 that far on amd64 needs one thing that has nothing to
	do with this PR: editors/emacs20 truncates a Lisp_Object on LP64,
	because code_convert_string_norecord is called with no declaration in
	scope, and set-language-environment "Japanese" dies before anthy is
	reached at all.  That is PR/60648.

	Without the patch, anthy on its own is unusable from emacs26 onwards
	even where it builds: last-command-char is void.  It appears to work
	only because init files carry

	  (define-obsolete-variable-alias 'last-command-char 'last-command-event ...)

	to paper over it.  That is a workaround in every user's init file for
	something the package should not require -- and it is worth knowing how
	far it gets them.  Rerunning the same check with a real init file that
	carries that alias:

	                    without the patch            with the patch
	  emacs26  26.3     converts                     converts
	  emacs27  27.2     process-kill-without-query   converts
	  emacs28  28.2     process-kill-without-query   converts
	  emacs29  29.4     set-face-underline-p         converts
	  emacs30  30.2     set-face-underline-p         converts

	So emacs26 is the last version on which anthy-elisp is usable at all,
	with or without the init-file workaround.  Anyone whose init file does

	  (load-library "anthy")
	  (setq default-input-method 'japanese-anthy)

	is pinned there.  On 27 and 28 the failure is quiet -- the init file
	loads, default-input-method is set, and the error arrives on the first
	keystroke.  On 29 and 30 it is loud but misleading: the init file dies
	at the load-library line, so default-input-method never gets set and
	the language environment's own default, the built-in "japanese", is
	what M-SPC brings up instead.

	The XEmacs row is byte compilation only.  anthy.el takes a different
	branch there and reads last-command-event as an event object rather
	than a character, so driving it from batch the way the GNU Emacs rows
	are driven would not be testing the same thing.  The point of the row
	is that the patch leaves XEmacs exactly where it found it: six .elc
	files before and after.  (anthy-isearch.el and anthy-kyuri.el need
	overlay.el from the fsf-compat XEmacs package; without it those two do
	not compile, with or without this patch.)

	Index: inputmethod/anthy-elisp/Makefile
	===================================================================
	RCS file: /cvsroot/pkgsrc/inputmethod/anthy-elisp/Makefile,v
	retrieving revision 1.14
	diff -u -u -r1.14 Makefile
	--- inputmethod/anthy-elisp/Makefile	8 May 2024 12:20:52 -0000	1.14
	+++ inputmethod/anthy-elisp/Makefile	17 Aug 2026 00:47:20 -0000
	@@ -2,7 +2,7 @@
	 
	 .include	"../../inputmethod/anthy/Makefile.common"
	 PKGNAME=	${EMACS_PKGNAME_PREFIX}anthy-elisp-${ANTHY_VERSION}
	-PKGREVISION=	6
	+PKGREVISION=	7
	 CATEGORIES=	inputmethod editors
	 
	 MAINTAINER=	[email protected]
	@@ -14,7 +14,11 @@
	 CONFIGURE_ENV+=	EMACS=${EMACS_BIN:Q}
	 EMACS_MODULES+=	base leim
	 
	-EMACS_VERSIONS_ACCEPTED=	emacs21 emacs21nox emacs20 xemacs215 xemacs215nox xemacs214 xemacs214nox
	+EMACS_VERSIONS_ACCEPTED=	emacs21 emacs21nox emacs20
	+EMACS_VERSIONS_ACCEPTED+=	xemacs215 xemacs215nox xemacs214 xemacs214nox
	+EMACS_VERSIONS_ACCEPTED+=	emacs29 emacs29nox
	+EMACS_VERSIONS_ACCEPTED+=	emacs30 emacs30nox
	+EMACS_VERSIONS_ACCEPTED+=	emacs31 emacs31nox
	 
	 .include "../../editors/emacs/modules.mk"
	 
	Index: inputmethod/anthy/distinfo
	===================================================================
	RCS file: /cvsroot/pkgsrc/inputmethod/anthy/distinfo,v
	retrieving revision 1.16
	diff -u -u -r1.16 distinfo
	--- inputmethod/anthy/distinfo	7 Sep 2023 14:44:51 -0000	1.16
	+++ inputmethod/anthy/distinfo	17 Aug 2026 00:47:20 -0000
	@@ -10,3 +10,5 @@
	 SHA512 (okinawa-20090801.t) = 03cd20ef12ea25bb462a94e77ee04825c5acd4e9281bfe9c33d390a0106d2e3113c51083389bb21996af9bcf9a74acde6fbcdc6006f737b8a74fc55abc7d6260
	 Size (okinawa-20090801.t) = 165520 bytes
	 SHA1 (patch-anthy.el) = 3464a065d4dd25f38cd2990e0796eba53e69876a
	+SHA1 (patch-src-util_anthy-dic.el) = 34c7f6ab82452b59cc1f62a7e7141bde858d602b
	+SHA1 (patch-src-util_anthy.el) = 5458e71132a036a4f842d2ec417bbd19fca608c5
	Index: inputmethod/anthy/patches/patch-src-util_anthy-dic.el
	===================================================================
	RCS file: inputmethod/anthy/patches/patch-src-util_anthy-dic.el
	diff -N inputmethod/anthy/patches/patch-src-util_anthy-dic.el
	--- /dev/null
	+++ inputmethod/anthy/patches/patch-src-util_anthy-dic.el
	@@ -0,0 +1,28 @@
	+$NetBSD$
	+
	+string-to-int was an obsolete alias for string-to-number and was removed in
	+Emacs 26.  string-to-number has existed since Emacs 20 and in XEmacs 20, so
	+the calls are renamed rather than guarded.
	+
	+See patch-src-util_anthy.el for the rest of this.
	+
	+--- src-util/anthy-dic.el.orig
	++++ src-util/anthy-dic.el
	+@@ -70,7 +70,7 @@
	+ (defun anthy-dic-get-special-noun-category (word)
	+   (let 
	+       ((res '())
	+-       (cat (string-to-int
	++       (cat (string-to-number
	+ 	     (read-from-minibuffer "1:$B?ML>(B 2:$BCOL>(B: "))))
	+     (cond ((= cat 1)
	+ 	   (setq res '(("$BIJ;l(B" "$B?ML>(B"))))
	+@@ -113,7 +113,7 @@
	+     (and (string= word "")
	+ 	 (setq word (read-from-minibuffer "$BC18l(B($B8l44$N$_(B): ")))
	+     (setq yomi (read-from-minibuffer (concat "$BFI$_(B (" word "): ")))
	+-    (setq cat (string-to-int
	++    (setq cat (string-to-number
	+ 	       (read-from-minibuffer
	+ 		"$B%+%F%4%j!<(B 1:$B0lHLL>;l(B 2:$B$=$NB>$NL>;l(B 3:$B7AMF;l(B 4:$BI{;l(B: ")))
	+     (cond ((= cat 1)
	Index: inputmethod/anthy/patches/patch-src-util_anthy.el
	===================================================================
	RCS file: inputmethod/anthy/patches/patch-src-util_anthy.el
	diff -N inputmethod/anthy/patches/patch-src-util_anthy.el
	--- /dev/null
	+++ inputmethod/anthy/patches/patch-src-util_anthy.el
	@@ -0,0 +1,98 @@
	+$NetBSD$
	+
	+Make anthy.el work on current Emacs.  Four names it uses were made obsolete
	+and later removed.  (The old backquote syntax it also used is already dealt
	+with by patch-anthy.el.)
	+
	+set-face-underline-p became an alias for set-face-underline in Emacs 24.3
	+and was removed in Emacs 29.  The call is at top level, so on Emacs 29 and
	+30 merely loading anthy.el signals an error, and anthy-isearch.el and
	+anthy-kyuri.el then fail to byte-compile because they (require 'anthy) --
	+their .elc files end up missing from what PLIST expects.
	+
	+process-kill-without-query was obsoleted by set-process-query-on-exit-flag
	+in Emacs 22.1 and removed in Emacs 27 -- NEWS.27, under "Some functions and
	+variables obsolete since Emacs 22 have been removed".  It is called from
	+anthy-check-agent, which anthy-do-send-recv-command calls to start
	+anthy-agent.  This one does not break the build -- byte compilation only
	+warns about an unknown function and every .elc is still produced -- but
	+japanese-anthy fails on the first conversion request, that is, as soon as
	+the input method is used at all.  This is the earliest of the five, so it,
	+not set-face-underline-p, is what makes Emacs 26 the last usable version.
	+
	+inactivate-input-method was renamed deactivate-input-method in Emacs 24.3
	+and the old name was removed in Emacs 29 -- NEWS.29, under "Some functions
	+and variables obsolete since Emacs 24 have been removed", which lists it
	+next to set-face-underline-p.  It is called from
	+anthy-leim-exit-from-minibuffer, which is put on minibuffer-exit-hook while
	+anthy is active in the minibuffer.
	+
	+inactivate-current-input-method-function was likewise renamed in Emacs 24.3.
	+anthy-leim-activate still assigns to the old name, so on any Emacs since
	+24.3 the input method has never been deactivated through the LEIM hook.
	+
	+last-command-char was an obsolete alias for last-command-event and was
	+removed in Emacs 24.  The XEmacs branch of this function already uses
	+last-command-event; only the GNU Emacs branch was left behind.
	+
	+emacs20, emacs21 and the XEmacs versions in EMACS_VERSIONS_ACCEPTED do not
	+have the new names, so the calls are guarded rather than renamed.
	+
	+anthy has not been released since 2009, so there is nowhere upstream to
	+send this.
	+
	+--- src-util/anthy.el.orig
	++++ src-util/anthy.el
	+@@ -71,7 +71,9 @@
	+ (defvar anthy-highlight-face nil)
	+ (defvar anthy-underline-face nil)
	+ (copy-face 'highlight 'anthy-highlight-face)
	+-(set-face-underline-p 'anthy-highlight-face t)
	++(if (fboundp 'set-face-underline)
	++    (set-face-underline 'anthy-highlight-face t)
	++  (set-face-underline-p 'anthy-highlight-face t))
	+ (copy-face 'underline 'anthy-underline-face)
	+ 
	+ ;;
	+@@ -745,7 +747,9 @@
	+ 	(if anthy-agent-process
	+ 	    (kill-process anthy-agent-process))
	+ 	(setq anthy-agent-process proc)
	+-	(process-kill-without-query proc)
	++	(if (fboundp 'set-process-query-on-exit-flag)
	++	    (set-process-query-on-exit-flag proc nil)
	++	  (process-kill-without-query proc))
	+ 	(if anthy-xemacs
	+ 	    (if (coding-system-p (find-coding-system 'euc-japan))
	+ 		(set-process-coding-system proc 'euc-japan 'euc-japan))
	+@@ -864,7 +868,9 @@
	+ ;; leim $B$N(B activate
	+ ;;
	+ (defun anthy-leim-activate (&optional name)
	+-  (setq inactivate-current-input-method-function 'anthy-leim-inactivate)
	++  (if (boundp 'deactivate-current-input-method-function)
	++      (setq deactivate-current-input-method-function 'anthy-leim-inactivate)
	++    (setq inactivate-current-input-method-function 'anthy-leim-inactivate))
	+   (setq anthy-leim-active-p t)
	+   (anthy-update-mode)
	+   (when (eq (selected-window) (minibuffer-window))
	+@@ -874,7 +880,9 @@
	+ ;; emacs$B$N%P%0Hr$1$i$7$$$G$9(B
	+ ;;
	+ (defun anthy-leim-exit-from-minibuffer ()
	+-  (inactivate-input-method)
	++  (if (fboundp 'deactivate-input-method)
	++      (deactivate-input-method)
	++    (inactivate-input-method))
	+   (when (<= (minibuffer-depth) 1)
	+     (remove-hook 'minibuffer-exit-hook 'anthy-leim-exit-from-minibuffer)))
	+ 
	+@@ -892,7 +900,7 @@
	+ 	 ((event-matches-key-specifier-p event 'backspace) 8)
	+ 	 (t
	+ 	  (char-to-int (event-to-character event)))))
	+-    last-command-char))
	++    last-command-event))
	+ 
	+ ;;
	+ ;;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.