>From aafde36c45bd0341b07707409873fb93cbbb33f1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 4 May 2015 22:41:20 -0700 Subject: [PATCH] C-x 8 shorthands for curved quotes, Euro, etc. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Although C-x 8 lets you insert arbitrary Unicode characters, it's awkward to use this to insert commonly used symbols such as curved quotes, the Euro symbol, etc. This patch adds simpler sequences for many Latin characters (e.g., the Euro), plus characters that are commonly found in English text and in basic math. For example, assuming the Alt key works on your keyboard and iso-transl is loaded, one can now type "A-[" instead of "A-RET LEFT SIN TAB RET" to get the character "‘" (U+2018 LEFT SINGLE QUOTATION MARK). (Bug#20499) * doc/emacs/mule.texi (Unibyte Mode): Many more Latin and a few other printing characters now work too. * etc/NEWS: Document this. * lisp/international/iso-transl.el (iso-transl-char-map): Withdraw "C-x 8 ." (· U+00B7 MIDDLE DOT), "C-x 8 =" (¯ U+00AF SPACING MACRON), and "C-x 8 u" (µ U+00B5 MICRO SIGN) as they are now used for compositions. The longer forms still work. Also support the following characters, which are used in either current English or Latin-alphabet or basic math text: ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıĴĵĶķĸĹĺĻļĽľĿŀŁł ŃńŅņŇňŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſȘșȚț ‐‑‒–—―‘’“”†‡•′″€№←→↔−≈≠≤≥ --- doc/emacs/mule.texi | 4 +- etc/NEWS | 11 +++ lisp/international/iso-transl.el | 168 +++++++++++++++++++++++++++++++++++++-- 3 files changed, 174 insertions(+), 9 deletions(-) diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index de381df..b7632a9 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -1660,8 +1660,8 @@ characters present directly on the keyboard or using @key{Compose} or @cindex compose character @cindex dead character @item -For Latin-1 only, you can use the key @kbd{C-x 8} as a ``compose -character'' prefix for entry of non-@acronym{ASCII} Latin-1 printing +You can use the key @kbd{C-x 8} as a ``compose character'' prefix for +entry of common non-@acronym{ASCII} Latin and a few other printing characters. @kbd{C-x 8} is good for insertion (in the minibuffer as well as other buffers), for searching, and in any other context where a key sequence is allowed. diff --git a/etc/NEWS b/etc/NEWS index 715295b..54affcb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -213,6 +213,17 @@ successive char insertions. ** Unicode names entered via C-x 8 RET now use substring completion by default. +** C-x 8 has shorthands for more Latin and a few other common chars. +For example, C-x 8 . I is now short for İ U+0130 LATIN CAPITAL LETTER +I WITH DOT ABOVE. As before, you can type C-x 8 C-h to list all +shorthands. To make room for the new shorthands, three aliases have +been withdrawn, as follows: + + withdrawn still works character + C-x 8 . C-x 8 . SPC · U+00B7 MIDDLE DOT + C-x 8 = C-x 8 = SPC ¯ U+00AF SPACING MACRON + C-x 8 u C-x 8 m µ U+00B5 MICRO SIGN + ** New minor mode global-eldoc-mode is enabled by default. ** Emacs now supports "bracketed paste mode" when running on a terminal diff --git a/lisp/international/iso-transl.el b/lisp/international/iso-transl.el index 73bcae0..1dff1c1 100644 --- a/lisp/international/iso-transl.el +++ b/lisp/international/iso-transl.el @@ -1,4 +1,4 @@ -;;; iso-transl.el --- keyboard input definitions for ISO 8859-1 -*- coding: utf-8 -*- +;;; iso-transl.el --- keyboard input for ISO characters -*- coding: utf-8 -*- ;; Copyright (C) 1987, 1993-1999, 2001-2015 Free Software Foundation, ;; Inc. @@ -36,6 +36,10 @@ ;; to make all of the Alt keys autoload, and it is not clear ;; that the dead accent keys SHOULD autoload this package. +;; This package supports all characters defined by ISO 8859-1, +;; along with many other Latin characters and a few other characters +;; commonly used in English and basic math. + ;;; Code: ;;; Provide some binding for startup: @@ -112,8 +116,7 @@ (",c" . [?ç]) ("*-" . [?­]) ("-" . [?­]) - ("*." . [?·]) - ("." . [?·]) + (". " . [?·]) ("//" . [?÷]) ("/A" . [?Å]) ("/E" . [?Æ]) @@ -126,8 +129,7 @@ ("3/4" . [?¾]) ("*<" . [?«]) ("<" . [?«]) - ("*=" . [?¯]) - ("=" . [?¯]) + ("= " . [?¯]) ("*>" . [?»]) (">" . [?»]) ("*?" . [?¿]) @@ -173,8 +175,6 @@ ("c" . [?¢]) ("*o" . [?°]) ("o" . [?°]) - ("*u" . [?µ]) - ("u" . [?µ]) ("*m" . [?µ]) ("m" . [?µ]) ("*x" . [?×]) @@ -192,6 +192,160 @@ ("~o" . [?õ]) ("~t" . [?þ]) ("~~" . [?¬]) + ("=A" . [?Ā]) + ("=a" . [?ā]) + ("uA" . [?Ă]) + ("ua" . [?ă]) + ("gA" . [?Ą]) + ("ga" . [?ą]) + ("'C" . [?Ć]) + ("'c" . [?ć]) + ("^C" . [?Ĉ]) + ("^c" . [?ĉ]) + (".C" . [?Ċ]) + (".c" . [?ċ]) + ("vC" . [?Č]) + ("vc" . [?č]) + ("vD" . [?Ď]) + ("vd" . [?ď]) + ("=D" . [?Đ]) + ("=d" . [?đ]) + ("=E" . [?Ē]) + ("=e" . [?ē]) + ("uE" . [?Ĕ]) + ("ue" . [?ĕ]) + (".E" . [?Ė]) + (".e" . [?ė]) + ("gE" . [?Ę]) + ("ge" . [?ę]) + ("vE" . [?Ě]) + ("ve" . [?ě]) + ("^G" . [?Ĝ]) + ("^g" . [?ĝ]) + ("uG" . [?Ğ]) + ("ug" . [?ğ]) + (".G" . [?Ġ]) + (".g" . [?ġ]) + (",G" . [?Ģ]) + (",g" . [?ģ]) + ("^H" . [?Ĥ]) + ("^h" . [?ĥ]) + ("=H" . [?Ħ]) + ("=h" . [?ħ]) + ("~I" . [?Ĩ]) + ("~i" . [?ĩ]) + ("=I" . [?Ī]) + ("=i" . [?ī]) + ("uI" . [?Ĭ]) + ("ui" . [?ĭ]) + ("gI" . [?Į]) + ("gi" . [?į]) + (".I" . [?İ]) + (".i" . [?ı]) + ("^J" . [?Ĵ]) + ("^j" . [?ĵ]) + (",K" . [?Ķ]) + (",k" . [?ķ]) + ("qk" . [?ĸ]) + ("'L" . [?Ĺ]) + ("'l" . [?ĺ]) + (",L" . [?Ļ]) + (",l" . [?ļ]) + ("vL" . [?Ľ]) + ("vl" . [?ľ]) + (".L" . [?Ŀ]) + (".l" . [?ŀ]) + ("=L" . [?Ł]) + ("=l" . [?ł]) + ("'N" . [?Ń]) + ("'n" . [?ń]) + (",N" . [?Ņ]) + (",n" . [?ņ]) + ("vN" . [?Ň]) + ("vn" . [?ň]) + ("Ng" . [?Ŋ]) + ("ng" . [?ŋ]) + ("=O" . [?Ō]) + ("=o" . [?ō]) + ("uO" . [?Ŏ]) + ("uo" . [?ŏ]) + ("2O" . [?Ő]) + ("2o" . [?ő]) + ("OE" . [?Œ]) + ("Oe" . [?œ]) + ("'R" . [?Ŕ]) + ("'r" . [?ŕ]) + (",R" . [?Ŗ]) + (",r" . [?ŗ]) + ("vR" . [?Ř]) + ("vr" . [?ř]) + ("'S" . [?Ś]) + ("'s" . [?ś]) + ("^S" . [?Ŝ]) + ("^s" . [?ŝ]) + (",S" . [?Ş]) + (",s" . [?ş]) + ("vS" . [?Š]) + ("vs" . [?š]) + (",T" . [?Ţ]) + (",t" . [?ţ]) + ("vT" . [?Ť]) + ("vt" . [?ť]) + ("=T" . [?Ŧ]) + ("=t" . [?ŧ]) + ("~U" . [?Ũ]) + ("~u" . [?ũ]) + ("=U" . [?Ū]) + ("=u" . [?ū]) + ("uU" . [?Ŭ]) + ("uu" . [?ŭ]) + ("/U" . [?Ů]) + ("/u" . [?ů]) + ("2U" . [?Ű]) + ("2u" . [?ű]) + ("gU" . [?Ų]) + ("gu" . [?ų]) + ("^W" . [?Ŵ]) + ("^w" . [?ŵ]) + ("^Y" . [?Ŷ]) + ("^y" . [?ŷ]) + ("\"Y" . [?Ÿ]) + ("'Z" . [?Ź]) + ("'z" . [?ź]) + (".Z" . [?Ż]) + (".z" . [?ż]) + ("vZ" . [?Ž]) + ("vz" . [?ž]) + ("ls" . [?ſ]) + (";S" . [?Ș]) + (";s" . [?ș]) + (";T" . [?Ț]) + (";t" . [?ț]) + ("_h" . [?‐]) + ("_H" . [?‑]) + ("_f" . [?‒]) + ("_n" . [?–]) + ("_m" . [?—]) + ("_q" . [?―]) + ("[" . [?‘]) + ("]" . [?’]) + ("{" . [?“]) + ("}" . [?”]) + ("1+" . [?†]) + ("2+" . [?‡]) + ("**" . [?•]) + ("*'" . [?′]) + ("*\"" . [?″]) + ("*E" . [?€]) + ("No" . [?№]) + ("a<" . [?←]) + ("a>" . [?→]) + ("a=" . [?↔]) + ("_-" . [?−]) + ("~=" . [?≈]) + ("/=" . [?≠]) + ("_<" . [?≤]) + ("_>" . [?≥]) ("' " . "'") ("` " . "`") ("\" " . "\"") -- 2.1.0