GNU bug report logs - #28118
25.1; input-method-deactivate-hook works twice because of backward compatibility

Previous Next

Package: emacs;

Reported by: Рейх Константин <reich-cv <at> yandex.ru>

Date: Thu, 17 Aug 2017 05:20:01 UTC

Severity: normal

Found in version 25.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#28118: closed (25.1; input-method-deactivate-hook works twice
 because of backward compatibility)
Date: Fri, 18 Aug 2017 09:36:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 18 Aug 2017 12:34:45 +0300
with message-id <83lgmhdxsa.fsf <at> gnu.org>
and subject line Re: bug#28118: 25.1; input-method-deactivate-hook works twice because of backward compatibility
has caused the debbugs.gnu.org bug report #28118,
regarding 25.1; input-method-deactivate-hook works twice because of backward compatibility
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
28118: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28118
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Рейх Константин <reich-cv <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1; input-method-deactivate-hook works twice because of backward
 compatibility
Date: Thu, 17 Aug 2017 07:07:44 +0300
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.


[Message part 3 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Konstantin Reich <reich-cv <at> yandex.ru>
Cc: 28118-done <at> debbugs.gnu.org
Subject: Re: bug#28118: 25.1;
 input-method-deactivate-hook works twice because of backward
 compatibility
Date: Fri, 18 Aug 2017 12:34:45 +0300
> From: Konstantin Reich <reich-cv <at> yandex.ru>
> 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.


This bug report was last modified 7 years and 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.