From: Meiyo Peng <meiyo@riseup.net>
To: znavko@disroot.org
Cc: guix-devel@gnu.org
Subject: Re: Let’s translate!
Date: Sat, 13 Apr 2019 17:46:18 +0800 [thread overview]
Message-ID: <878swexmol.fsf@riseup.net> (raw)
In-Reply-To: <850d3fe50a8a6b5ea24f3bdcb409d757@disroot.org>
Hi znavko,
znavko@disroot.org writes:
> I've found this emacs config (~/.emacs) in linux.org.ru, that makes workable emacs commands (such as C-c C-c) when keyboard layout is not English. It works for me in Russian layout, and Chinese too as I tried.
>
> ;;Make emacs commands work when keyboard layout is not English
> (defun reverse-input-method (input-method)
> "Build the reverse mapping of single letters from INPUT-METHOD."
> (interactive
> (list (read-input-method-name "Use input method (default current): ")))
> (if (and input-method (symbolp input-method))
> (setq input-method (symbol-name input-method)))
> (let ((current current-input-method)
> (modifiers '(nil (control) (meta) (control meta))))
> (when input-method
> (activate-input-method input-method))
> (when (and current-input-method quail-keyboard-layout)
> (dolist (map (cdr (quail-map)))
> (let* ((to (car map))
> (from (quail-get-translation
> (cadr map) (char-to-string to) 1)))
> (when (and (characterp from) (characterp to))
> (dolist (mod modifiers)
> (define-key local-function-key-map
> (vector (append mod (list from)))
> (vector (append mod (list to)))))))))
> (when input-method
> (activate-input-method current))))
>
> (defadvice read-passwd (around my-read-passwd act)
> (let ((local-function-key-map nil))
> ad-do-it))
>
> (reverse-input-method 'russian-computer)
>
>
> There are suggestions for emacs config to make po-mode by default and also ispell spellchecker in my blog:
> dev-znavko.pantheonsite.io
>
> Hope it helps!
Thank you for the trick. The default behavior of Emacs is indeed
annoying if a special input method is enabled. But I only enable
Chinese Input Method when I input Chinese characters. That's less than
1% of my time with Emacs. So I am OK with the default behavior.
--
Meiyo Peng
https://www.pengmeiyu.com/
next prev parent reply other threads:[~2019-04-13 9:46 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-11 9:54 New template for 'guix-manual' made available Translation Project Robot
2019-04-12 20:43 ` Let’s translate! Ludovic Courtès
2019-04-13 1:56 ` Meiyo Peng
2019-04-13 6:45 ` pelzflorian (Florian Pelz)
2019-04-13 7:49 ` pelzflorian (Florian Pelz)
2019-04-13 9:33 ` Meiyo Peng
2019-04-13 7:14 ` Julien Lepiller
2019-04-13 9:27 ` Meiyo Peng
2019-04-23 0:42 ` [PATCH 0/2] Removal of generated files (was Re: Let’s translate!) Miguel
2019-04-23 0:43 ` [PATCH 1/2] bootstrap: Break automake dependency on generated files. " Miguel
2019-04-23 7:28 ` Julien Lepiller
2019-04-23 10:28 ` Miguel
2019-04-26 9:30 ` Julien Lepiller
2019-04-26 11:05 ` Miguel
2019-04-26 18:55 ` Julien Lepiller
2019-04-26 22:10 ` Ludovic Courtès
2019-04-27 12:32 ` Julien Lepiller
2019-04-27 13:52 ` Ludovic Courtès
2019-04-23 14:30 ` Ludovic Courtès
2019-04-23 22:51 ` Miguel
2019-04-24 10:37 ` Julien Lepiller
2019-04-25 8:50 ` Ludovic Courtès
2019-04-25 9:54 ` Julien Lepiller
2019-04-26 8:39 ` Ludovic Courtès
[not found] ` <20190423024427.10cd6e87@gmail.com>
2019-04-23 22:42 ` [PATCH 2/2] doc: Add Spanish translation. " Ludovic Courtès
2019-04-13 7:49 ` Let’s translate! znavko
2019-04-13 9:46 ` Meiyo Peng [this message]
2019-04-15 12:38 ` Ludovic Courtès
2019-04-13 5:11 ` znavko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878swexmol.fsf@riseup.net \
--to=meiyo@riseup.net \
--cc=guix-devel@gnu.org \
--cc=znavko@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).