Is this patch rejected? :-/ At 2021-04-29 06:37:58, "tumashu" wrote: maybe, but test a variable value is really a function before funcall it, seem to be better way, I think :-) -- 发自我的网易邮箱手机智能版


----- Original Message ----- From: "Eli Zaretskii" To: tumashu Cc: emacs-devel@gnu.org Sent: Wed, 28 Apr 2021 18:03:10 +0300 Subject: Re: [patch] * lisp/international/mule-cmds.el (deactivate-input-method): Tiny improve. > Date: Wed, 28 Apr 2021 20:33:23 +0800 (CST) > From: tumashu > Cc: "emacs-devel@gnu.org" > > >> - (funcall deactivate-current-input-method-function)) > >> + (when (functionp deactivate-current-input-method-function) > >> + (funcall deactivate-current-input-method-function))) > > > >Thanks, but could you please explain why this is needed? IOW, in > >which use case did you see this function called when > >deactivate-current-input-method-function wasn't a function? > > Yes, I have faced some bugs of pyim in evil environment, sometimes, this variable maybe is nil. > I can not find why. I see traces of using defadvise there. Could it be that the advice calls deactivate-input-method incorrectly?