diff options
| author | Paul Eggert | 2015-05-10 17:24:05 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-05-10 17:42:21 -0700 |
| commit | 4b41540b424468aeca87b9b47ffda2be25c5dac4 (patch) | |
| tree | 09810a04d1c78cc80274f0732fc195a6be70b52f | |
| parent | 089632800a1d408d2d2a9f0ecc5c52ce9c5319c6 (diff) | |
| download | emacs-4b41540b424468aeca87b9b47ffda2be25c5dac4.tar.gz emacs-4b41540b424468aeca87b9b47ffda2be25c5dac4.zip | |
C-x 8 shorthands for curved quotes, Euro, etc.
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
characters 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):
A few other printing characters now work too.
* etc/NEWS: Document this.
* lisp/international/iso-transl.el (iso-transl-char-map):
Also support the following characters:
‐ ‑ ‒ – — ― ‘ ’ “ ” † ‡ • ′ ″ € № ← → ↔ − ≈ ≠ ≤ ≥
| -rw-r--r-- | doc/emacs/mule.texi | 4 | ||||
| -rw-r--r-- | etc/NEWS | 3 | ||||
| -rw-r--r-- | lisp/international/iso-transl.el | 31 |
3 files changed, 35 insertions, 3 deletions
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index de381dfa1e8..d929e0947e1 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 | |||
| 1660 | @cindex compose character | 1660 | @cindex compose character |
| 1661 | @cindex dead character | 1661 | @cindex dead character |
| 1662 | @item | 1662 | @item |
| 1663 | For Latin-1 only, you can use the key @kbd{C-x 8} as a ``compose | 1663 | You can use the key @kbd{C-x 8} as a ``compose character'' prefix for |
| 1664 | character'' prefix for entry of non-@acronym{ASCII} Latin-1 printing | 1664 | entry of non-@acronym{ASCII} Latin-1 and a few other printing |
| 1665 | characters. @kbd{C-x 8} is good for insertion (in the minibuffer as | 1665 | characters. @kbd{C-x 8} is good for insertion (in the minibuffer as |
| 1666 | well as other buffers), for searching, and in any other context where | 1666 | well as other buffers), for searching, and in any other context where |
| 1667 | a key sequence is allowed. | 1667 | a key sequence is allowed. |
| @@ -213,6 +213,9 @@ successive char insertions. | |||
| 213 | 213 | ||
| 214 | ** Unicode names entered via C-x 8 RET now use substring completion by default. | 214 | ** Unicode names entered via C-x 8 RET now use substring completion by default. |
| 215 | 215 | ||
| 216 | ** C-x 8 now has shorthands for these chars: ‐ ‑ ‒ – — ― ‘ ’ “ ” † ‡ • ′ ″ | ||
| 217 | € № ← → ↔ − ≈ ≠ ≤ ≥. As before, you can type C-x 8 C-h to list shorthands. | ||
| 218 | |||
| 216 | ** New minor mode global-eldoc-mode is enabled by default. | 219 | ** New minor mode global-eldoc-mode is enabled by default. |
| 217 | 220 | ||
| 218 | ** Emacs now supports "bracketed paste mode" when running on a terminal | 221 | ** 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 73bcae060b3..e9fb009a56e 100644 --- a/lisp/international/iso-transl.el +++ b/lisp/international/iso-transl.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; iso-transl.el --- keyboard input definitions for ISO 8859-1 -*- coding: utf-8 -*- | 1 | ;;; iso-transl.el --- keyboard input for ISO 10646 chars -*- coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1987, 1993-1999, 2001-2015 Free Software Foundation, | 3 | ;; Copyright (C) 1987, 1993-1999, 2001-2015 Free Software Foundation, |
| 4 | ;; Inc. | 4 | ;; Inc. |
| @@ -36,6 +36,10 @@ | |||
| 36 | ;; to make all of the Alt keys autoload, and it is not clear | 36 | ;; to make all of the Alt keys autoload, and it is not clear |
| 37 | ;; that the dead accent keys SHOULD autoload this package. | 37 | ;; that the dead accent keys SHOULD autoload this package. |
| 38 | 38 | ||
| 39 | ;; This package supports all characters defined by ISO 8859-1, along | ||
| 40 | ;; with a few other ISO 10646 characters commonly used in English and | ||
| 41 | ;; basic math. | ||
| 42 | |||
| 39 | ;;; Code: | 43 | ;;; Code: |
| 40 | 44 | ||
| 41 | ;;; Provide some binding for startup: | 45 | ;;; Provide some binding for startup: |
| @@ -192,6 +196,31 @@ | |||
| 192 | ("~o" . [?õ]) | 196 | ("~o" . [?õ]) |
| 193 | ("~t" . [?þ]) | 197 | ("~t" . [?þ]) |
| 194 | ("~~" . [?¬]) | 198 | ("~~" . [?¬]) |
| 199 | ("_h" . [?‐]) | ||
| 200 | ("_H" . [?‑]) | ||
| 201 | ("_f" . [?‒]) | ||
| 202 | ("_n" . [?–]) | ||
| 203 | ("_m" . [?—]) | ||
| 204 | ("_q" . [?―]) | ||
| 205 | ("[" . [?‘]) | ||
| 206 | ("]" . [?’]) | ||
| 207 | ("{" . [?“]) | ||
| 208 | ("}" . [?”]) | ||
| 209 | ("1+" . [?†]) | ||
| 210 | ("2+" . [?‡]) | ||
| 211 | ("**" . [?•]) | ||
| 212 | ("*'" . [?′]) | ||
| 213 | ("*\"" . [?″]) | ||
| 214 | ("*E" . [?€]) | ||
| 215 | ("No" . [?№]) | ||
| 216 | ("a<" . [?←]) | ||
| 217 | ("a>" . [?→]) | ||
| 218 | ("a=" . [?↔]) | ||
| 219 | ("_-" . [?−]) | ||
| 220 | ("~=" . [?≈]) | ||
| 221 | ("/=" . [?≠]) | ||
| 222 | ("_<" . [?≤]) | ||
| 223 | ("_>" . [?≥]) | ||
| 195 | ("' " . "'") | 224 | ("' " . "'") |
| 196 | ("` " . "`") | 225 | ("` " . "`") |
| 197 | ("\" " . "\"") | 226 | ("\" " . "\"") |