From b0f6b83357eb8e301cab2060c7fe2c8d580c2504 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 10 Nov 2020 21:21:18 +0200 Subject: [PATCH] * lisp/leim/quail/compose.el ("iso-transl"): New input method. * doc/emacs/basic.texi (Inserting Text): Mention transient input method "iso-transl". * lisp/leim/quail/latin-ltx.el: Use same Keywords as in other quail files. --- doc/emacs/basic.texi | 6 ++++++ etc/NEWS | 7 +++++++ lisp/leim/quail/compose.el | 26 ++++++++++++++++++++++++++ lisp/leim/quail/latin-ltx.el | 2 +- 4 files changed, 40 insertions(+), 1 deletion(-) diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index 2e03d0c04a3..cd1ffbebd7c 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -145,6 +145,12 @@ the buffer. A numeric argument to @kbd{C-q} or @kbd{C-x 8 ...} specifies how many copies of the character to insert (@pxref{Arguments}). + As an alternative to @kbd{C-x 8}, you can select the corresponding +transient input method by typing @kbd{C-u C-x \ iso-transl @key{RET}}, +then temporarily activating this transient input method by typing +@kbd{C-x \ [} will insert the same character @t{‘} (@pxref{transient +input method}). + In addition, in some contexts, if you type a quotation using grave accent and apostrophe @kbd{`like this'}, it is converted to a form @t{‘like this’} using single quotation marks, even without @kbd{C-x 8} diff --git a/etc/NEWS b/etc/NEWS index 7eb0b6c5ccc..eb532ce67a5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -663,6 +663,13 @@ to the search string. --- *** New input method 'compose' based on X Multi_key sequences. +--- +*** New input method 'iso-transl' with the same keys as 'C-x 8'. +After selecting it as a transient input method with 'C-u C-x \ +iso-transl RET', it supports the same key sequences as 'C-x 8', +so e.g. like 'C-x 8 [' inserts a left single quotation mark, +'C-x \ [' does the same. + --- *** Improved language transliteration in Malayalam input methods. Added a new Mozhi scheme. The inapplicable ITRANS scheme is now diff --git a/lisp/leim/quail/compose.el b/lisp/leim/quail/compose.el index eb37a42199b..de251a364e6 100644 --- a/lisp/leim/quail/compose.el +++ b/lisp/leim/quail/compose.el @@ -2922,5 +2922,31 @@ Examples: ("_⍵" ?⍹) ) +;; Quail package `iso-transl' is based on `C-x 8' key sequences. +;; This input method supports the same key sequences as defined +;; by the `C-x 8' keymap in iso-transl.el. + +(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--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--define-rules) + (provide 'compose) ;;; compose.el ends here diff --git a/lisp/leim/quail/latin-ltx.el b/lisp/leim/quail/latin-ltx.el index 6a2508ba31d..f1a24bbd5fe 100644 --- a/lisp/leim/quail/latin-ltx.el +++ b/lisp/leim/quail/latin-ltx.el @@ -8,7 +8,7 @@ ;; Author: TAKAHASHI Naoto ;; Dave Love -;; Keywords: multilingual, input, Greek, i18n +;; Keywords: multilingual, input method, i18n ;; This file is part of GNU Emacs. -- 2.39.2