unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 44267@debbugs.gnu.org
Subject: bug#44267: New input method 'compose'
Date: Wed, 28 Oct 2020 21:30:33 +0200	[thread overview]
Message-ID: <87k0vaqgum.fsf@mail.linkov.net> (raw)
In-Reply-To: <83ft5ycpo4.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 28 Oct 2020 17:53:47 +0200")

[-- Attachment #1: Type: text/plain, Size: 266 bytes --]

> Also it's possible to create a new input method from the existing
> 'C-x 8' keymap, and set it as the default method, e.g.:
>
> C-u C-x \ iso-transl RET
> C-x \ * E   - inserts the character EURO SIGN

So here is the input method created from the 'C-x 8' keymap:


[-- Attachment #2: iso-transl-im.el --]
[-- Type: application/emacs-lisp, Size: 1771 bytes --]

;;; iso-transl-im.el --- Quail package based on `C-x 8' key sequences -*-coding: utf-8;-*-

;; Copyright (C) 2020 Free Software Foundation, Inc.

;; Keywords: multilingual, input method, i18n

;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:

;; This input method supports the same key sequences as defined by the
;; `C-x 8' keymap in iso-transl.el.

;;; Code:

(require 'quail)

(quail-define-package
 "iso-transl" "UTF-8" "X8" t
 "Use the same key sequences as in `C-x 8' keymap defined in iso-transl.el.
Examples:
 * E -> €   1 / 2 -> ½   ^ 3 -> ³"
 '(("\t" . quail-completion))
 t nil nil nil nil nil nil nil nil t)

(eval-when-compile
  (require 'iso-transl)
  (defmacro iso-transl-im--define-rules ()
    `(quail-define-rules
      ,@(mapcar (lambda (rule)
                  (let ((from (car rule))
                        (to (cdr rule)))
                    (list from (if (stringp to)
                                   (vector to) to))))
                iso-transl-char-map))))

(iso-transl-im--define-rules)

(provide 'iso-transl-im)
;;; iso-transl-im.el ends here

  reply	other threads:[~2020-10-28 19:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 20:30 bug#44267: New input method 'compose' Juri Linkov
2020-10-28 11:39 ` Lars Ingebrigtsen
2020-10-28 11:41   ` Lars Ingebrigtsen
2020-10-28 15:53 ` Eli Zaretskii
2020-10-28 19:30   ` Juri Linkov [this message]
2020-11-10 19:21     ` Juri Linkov
2020-10-28 19:49   ` Juri Linkov
2020-11-01 21:25     ` Juri Linkov

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://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k0vaqgum.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=44267@debbugs.gnu.org \
    --cc=eliz@gnu.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/emacs.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).