Subject: bug#28118: closed (Re: bug#28118: 25.1; input-method-deactivate-hook works twice because of backward compatibility)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 18 Aug 2017 09:36:02 +0000

Your bug report

#28118: 25.1; input-method-deactivate-hook works twice because of backward compatibility

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
28118: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28118
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#28118: 25.1; input-method-deactivate-hook works twice because of backward compatibility
From: Eli Zaretskii <[email-masked]>
To: Konstantin Reich <[email-masked]>
Cc: [email-masked]
Date: Fri, 18 Aug 2017 12:34:45 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Konstantin Reich <[email-masked]>
> Date: Fri, 18 Aug 2017 06:36:47 +0300
> 
> I think the following patch solves the problem.

Indeed, but there were several other instances of the same bug.  Now
fixed on the master branch.

Thanks.

Subject: 25.1; input-method-deactivate-hook works twice because of backward compatibility
From: Рейх Константин <[email-masked]>
To: [email-masked]
Date: Thu, 17 Aug 2017 07:07:44 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

I noticed that when i add hook to input-method-deactivate-hook i also
add hook to input-method-inactivate-hook. As a result  the hook in
input-method-deactivate-hook works twice, which should not be the case.

This can be seen from the code in function deactivate-input-method in international/mule-cmds.el:
....
 (run-hooks
	   'input-method-inactivate-hook ; for backward compatibility
	   'input-method-deactivate-hook)
.....

For example
(add-hook 'input-method-deactivate-hook '(lambda () (message
"b") ))

produces "b [2 times]" with deactivation of the input method. 

All version of emacs from 24.3 are affected.