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

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

Re: Setting input method automatically whenever text is to be entered.


From: Alex Kost
Subject: Re: Setting input method automatically whenever text is to be entered.
Date: Fri, 23 Apr 2021 18:21:09 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

max.brieiev@gmail.com (2021-04-20 18:10 +0300) wrote:

> Hi

Hello!

> I am quite new Emacs user. I prefer to type text using Dvorak
> layout. Each time I visit new buffer or interact with minibuffer I have
> to press C-\, which is rather inconvenient. So I added the following to
> my .emacs file:
>
> (defun set-dvp-input-method (mode-hook)
>   (add-hook mode-hook
>             (lambda ()
>               (if (not (string= current-input-method "programmer-dvorak"))
>                   (set-input-method "programmer-dvorak")))))
>
> (mapc #'set-dvp-input-method
>       '(text-mode-hook
>         prog-mode-hook
>         special-mode-hook
>         minibuffer-setup-hook
>         comint-mode-hook
>         dired-mode
>         info-mode-hook
>         term-mode-hook
>         Custom-mode-hook))
[...]
> There are also some more annoyances. In some minibuffer yes-no prompts I
> have to press keys as they are located on qwerty layout, however in the
> other seemingly same prompts the key needs to be pressed as on
> Dvorak. Is there some way to fix this?

You can use `after-change-major-mode-hook' instead of specifying all
those mode-hooks manually.

BTW, I also use Dvorak ;-)

-- 
Alex



reply via email to

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