bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43084: toggle-korean-input-method, Korean with Dvorak


From: Lars Ingebrigtsen
Subject: bug#43084: toggle-korean-input-method, Korean with Dvorak
Date: Fri, 29 Jan 2021 06:08:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

"L.J. Lee" <lj.is.writing@gmail.com> writes:

>>> (with-eval-after-load "language/korea-util"
>>> (defun toggle-korean-input-method ()
>>> "Turn on or off a Korean text input method for the current butter."
>>> (interactive)
>>> (if current-input-method
>>>     (deactivate-input-method)
>>>     (activate-input-method)
>>>         (concat "korean-hangul3f" default-korean-keyboard)))))
>>
>> I don't use the Korean input methods, so this is totally uninformed --
>> but looking at the code, your alteration seems to be the same as putting
>>
>> (setq default-korean-keyboard "3f")
>>
>> in your init file?
>>
>> In which case configuring this is already supported in Emacs.
>
> It doesn't, actually--your suggested method was what I tried at first,
> because it's the normal way to do things.

I'm just reading the code, and I don't quite understand why.
`default-korean-keyboard' is (by default) "", so this:

(defun toggle-korean-input-method ()
  "Turn on or off a Korean text input method for the current buffer."
  (interactive)
  (if current-input-method
      (deactivate-input-method)
    (activate-input-method
     (concat "korean-hangul" default-korean-keyboard))))

means that we call

(activate-input-method "korean-hangul")

If `default-korean-keyboard' was "3f", then we'd call

(activate-input-method "korean-hangul3f")

You suggested this change:

>>>     (activate-input-method)
>>>         (concat "korean-hangul3f" default-korean-keyboard)))))

and assuming that ")" after `activate-input-method' is a typo, that
would mean that we call

(activate-input-method "korean-hangul3f")

which is identical to what we'd get if we set the variable to "3f".

Or am I misreading the code or what you suggested?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]