-
Notifications
You must be signed in to change notification settings - Fork 0
/
unicode-keymap-extensions.el
322 lines (293 loc) · 15.3 KB
/
unicode-keymap-extensions.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
;;; unicode-keymap-extensions.el --- Unicode keymap -*- lexical-binding: t -*-
;;
;; -*- coding: utf-8 -*-
;;
;; Copyright © 2017 Andrew L. Moore
;; Author: Andrew L. Moore <alm@gnu.org>
;; Keywords: editing, languages, lisp
;; URL: https://github.com/slewsys/emacs-extensions
;; This file is not part of GNU Emacs.
;;; Commentary:
;;
;; `unicode-keymap-extensions-mode' is a minor mode that provides
;; extended Unicode input bindings.
;;
;;; Installation:
;;
;; (require 'unicode-keymap-extensions)
;;
;; To enable `unicode-keymap-extensions-mode' globally:
;;
;; (unicode-keymap-extensions-mode)
;;
;; To enable locally - per major mode only, .e.g, `elisp-mode' - use instead:
;;
;; (add-hook 'elisp-mode-hook #'unicode-keymap-extensions-local-mode)
;;
;; To enable globally with some major mode exceptions, e.g., `elisp-mode', use:
;;
;; (unicode-keymap-extensions-mode)
;; (add-hook 'elisp-mode-hook
;; (lambda ()
;; (unicode-keymap-extensions-local-mode -1)))
;;
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Unicode Latin-1 Supplement and Latin Extended-A keymap.
;;
(defgroup unicode-keymap-extensions ()
"Extended Unicode input bindings."
:package-version '(unicode-keymap-extensions . "1.1")
:group 'editing)
(defcustom unicode-keymap-extensions-bindings
;;; KEY SEQUENCE UNICODE CHAR
`((,(kbd "C-x 8 : :") . ":") ;;; FULL-WIDTH COLON
(,(kbd "C-x 8 : /") . "/") ;;; FULL-WIDTH SOLIDUS
(,(kbd "C-x 8 / l") . "ł") ;;; SMALL L WITH STROKE
(,(kbd "C-x 8 / L") . "Ł") ;;; CAPITAL L WITH STROKE
(,(kbd "C-x 8 v c") . "č") ;;; SMALL C WITH CARON
(,(kbd "C-x 8 v C") . "Č") ;;; CAPITAL C WITH CARON
(,(kbd "C-x 8 v e") . "ě") ;;; SMALL E WITH CARON
(,(kbd "C-x 8 v E") . "Ě") ;;; CAPITAL E WITH CARON
(,(kbd "C-x 8 v r") . "ř") ;;; SMALL R WITH CARON
(,(kbd "C-x 8 v R") . "Ř") ;;; CAPITAL R WITH CARON
(,(kbd "C-x 8 v s") . "š") ;;; SMALL S WITH CARON
(,(kbd "C-x 8 v S") . "Š") ;;; CAPITAL S WITH CARON
(,(kbd "C-x 8 v z") . "ž") ;;; SMALL Z WITH CARON
(,(kbd "C-x 8 v Z") . "Ž") ;;; CAPITAL Z WITH CARON
(,(kbd "C-x 8 . z") . "ż") ;;; SMALL Z WITH DOT ABOVE
(,(kbd "C-x 8 . Z") . "Ż") ;;; CAPITAL Z WITH DOT ABOVE
(,(kbd "C-x 8 , e") . "ę") ;;; SMALL E WITH OGONEK
(,(kbd "C-x 8 , E") . "Ę") ;;; CAPITAL E WITH OGONEK
(,(kbd "C-x 8 e a") . "æ") ;;; SMALL LATIN AE
(,(kbd "C-x 8 E A") . "Æ") ;;; CAPITAL LATIN AE
(,(kbd "C-x 8 e o") . "œ") ;;; SMALL LATIN OE
(,(kbd "C-x 8 E O") . "Œ") ;;; CAPITAL LATIN OE
(,(kbd "C-x 8 g a") . "α") ;;; GREEK SMALL LETTER ALPHA
(,(kbd "C-x 8 g b") . "β") ;;; GREEK SMALL LETTER BETA
(,(kbd "C-x 8 g g") . "γ") ;;; GREEK SMALL LETTER GAMMA
(,(kbd "C-x 8 g d") . "δ") ;;; GREEK SMALL LETTER DELTA
(,(kbd "C-x 8 g e") . "ε") ;;; GREEK SMALL LETTER EPSILON
(,(kbd "C-x 8 g z") . "ζ") ;;; GREEK SMALL LETTER ZETA
(,(kbd "C-x 8 g h") . "η") ;;; GREEK SMALL LETTER ETA
(,(kbd "C-x 8 g f") . "θ") ;;; GREEK SMALL LETTER THETA
(,(kbd "C-x 8 g i") . "ι") ;;; GREEK SMALL LETTER IOTA
(,(kbd "C-x 8 g k") . "κ") ;;; GREEK SMALL LETTER KAPPA
(,(kbd "C-x 8 g l") . "λ") ;;; GREEK SMALL LETTER LAMDA
(,(kbd "C-x 8 g m") . "μ") ;;; GREEK SMALL LETTER MU
(,(kbd "C-x 8 g n") . "ν") ;;; GREEK SMALL LETTER NU
(,(kbd "C-x 8 g x") . "ξ") ;;; GREEK SMALL LETTER XI
(,(kbd "C-x 8 g o") . "ο") ;;; GREEK SMALL LETTER OMICRON
(,(kbd "C-x 8 g p") . "π") ;;; GREEK SMALL LETTER PI
(,(kbd "C-x 8 g r") . "ρ") ;;; GREEK SMALL LETTER RHO
(,(kbd "C-x 8 g s") . "σ") ;;; GREEK SMALL LETTER SIGMA
(,(kbd "C-x 8 g t") . "τ") ;;; GREEK SMALL LETTER TAU
(,(kbd "C-x 8 g u") . "υ") ;;; GREEK SMALL LETTER UPSILON
(,(kbd "C-x 8 g v") . "φ") ;;; GREEK SMALL LETTER PHI
(,(kbd "C-x 8 g c") . "χ") ;;; GREEK SMALL LETTER CHI
(,(kbd "C-x 8 g y") . "ψ") ;;; GREEK SMALL LETTER PSI
(,(kbd "C-x 8 g w") . "ω") ;;; GREEK SMALL LETTER OMEGA
(,(kbd "C-x 8 g A") . "Α") ;;; GREEK CAPITAL LETTER ALPHA
(,(kbd "C-x 8 g B") . "Β") ;;; Greek CAPITAL LETTER BETA
(,(kbd "C-x 8 g G") . "Γ") ;;; GREEK CAPITAL LETTER GAMMA
(,(kbd "C-x 8 g D") . "Δ") ;;; GREEK CAPITAL LETTER DELTA
(,(kbd "C-x 8 g E") . "Ε") ;;; GREEK CAPITAL LETTER EPSILON
(,(kbd "C-x 8 g Z") . "Ζ") ;;; GREEK CAPITAL LETTER ZETA
(,(kbd "C-x 8 g H") . "Η") ;;; GREEK CAPITAL LETTER ETA
(,(kbd "C-x 8 g F") . "Θ") ;;; GREEK CAPITAL LETTER THETA
(,(kbd "C-x 8 g I") . "Ι") ;;; GREEK CAPITAL LETTER IOTA
(,(kbd "C-x 8 g K") . "Κ") ;;; GREEK CAPITAL LETTER KAPPA
(,(kbd "C-x 8 g L") . "Λ") ;;; GREEK CAPITAL LETTER LAMDA
(,(kbd "C-x 8 g M") . "Μ") ;;; GREEK CAPITAL LETTER MU
(,(kbd "C-x 8 g N") . "Ν") ;;; GREEK CAPITAL LETTER NU
(,(kbd "C-x 8 g X") . "Ξ") ;;; GREEK CAPITAL LETTER XI
(,(kbd "C-x 8 g O") . "Ο") ;;; GREEK CAPITAL LETTER OMICRON
(,(kbd "C-x 8 g P") . "Π") ;;; GREEK CAPITAL LETTER PI
(,(kbd "C-x 8 g R") . "Ρ") ;;; GREEK CAPITAL LETTER RHO
(,(kbd "C-x 8 g S") . "Σ") ;;; GREEK CAPITAL LETTER SIGMA
(,(kbd "C-x 8 g T") . "Τ") ;;; GREEK CAPITAL LETTER TAU
(,(kbd "C-x 8 g U") . "Υ") ;;; GREEK CAPITAL LETTER UPSILON
(,(kbd "C-x 8 g V") . "Φ") ;;; GREEK CAPITAL LETTER PHI
(,(kbd "C-x 8 g C") . "Χ") ;;; GREEK CAPITAL LETTER CHI
(,(kbd "C-x 8 g Y") . "Ψ") ;;; GREEK CAPITAL LETTER PSI
(,(kbd "C-x 8 g W") . "Ω") ;;; GREEK CAPITAL LETTER OMEGA
(,(kbd "C-x 8 h a") . "א") ;;; HEBREW LETTER ALEF
(,(kbd "C-x 8 h b") . "ב") ;;; HEBREW LETTER BET
(,(kbd "C-x 8 h g") . "ג") ;;; HEBREW LETTER GIMEL
(,(kbd "C-x 8 h d") . "ד") ;;; HEBREW LETTER DALET
(,(kbd "C-x 8 h h") . "ה") ;;; HEBREW LETTER HE
(,(kbd "C-x 8 h v") . "ו") ;;; HEBREW LETTER VAV
(,(kbd "C-x 8 h z") . "ז") ;;; HEBREW LETTER ZAYIN
(,(kbd "C-x 8 h c") . "ח") ;;; HEBREW LETTER HET
(,(kbd "C-x 8 h f") . "ט") ;;; HEBREW LETTER TET
(,(kbd "C-x 8 h y") . "י") ;;; HEBREW LETTER YOD
(,(kbd "C-x 8 h K") . "ך") ;;; HEBREW LETTER FINAL KAF
(,(kbd "C-x 8 h k") . "כ") ;;; HEBREW LETTER KAF
(,(kbd "C-x 8 h l") . "ל") ;;; HEBREW LETTER LAMED
(,(kbd "C-x 8 h M") . "ם") ;;; HEBREW LETTER FINAL MEM
(,(kbd "C-x 8 h m") . "מ") ;;; HEBREW LETTER MEM
(,(kbd "C-x 8 h N") . "ן") ;;; HEBREW LETTER FINAL NUN
(,(kbd "C-x 8 h n") . "נ") ;;; HEBREW LETTER NUN
(,(kbd "C-x 8 h x") . "ס") ;;; HEBREW LETTER SAMEKH
(,(kbd "C-x 8 h j") . "ע") ;;; HEBREW LETTER AYIN
(,(kbd "C-x 8 h P") . "ף") ;;; HEBREW LETTER FINAL PE
(,(kbd "C-x 8 h p") . "פ") ;;; HEBREW LETTER PE
(,(kbd "C-x 8 h Z") . "ץ") ;;; HEBREW LETTER FINAL TSADI
(,(kbd "C-x 8 h z") . "צ") ;;; HEBREW LETTER TSADI
(,(kbd "C-x 8 h q") . "ק") ;;; HEBREW LETTER QOF
(,(kbd "C-x 8 h r") . "ר") ;;; HEBREW LETTER RESH
(,(kbd "C-x 8 h s") . "ש") ;;; HEBREW LETTER SHIN
(,(kbd "C-x 8 h t") . "ת") ;;; HEBREW LETTER TAV
(,(kbd "C-x 8 r a") . "а") ;;; CYRILLIC SMALL LETTER A
(,(kbd "C-x 8 r b") . "б") ;;; CYRILLIC SMALL LETTER BE
(,(kbd "C-x 8 r v") . "в") ;;; CYRILLIC SMALL LETTER VE
(,(kbd "C-x 8 r w") . "в") ;;; CYRILLIC SMALL LETTER VE
(,(kbd "C-x 8 r g") . "г") ;;; CYRILLIC SMALL LETTER GHE
(,(kbd "C-x 8 r d") . "д") ;;; CYRILLIC SMALL LETTER DE
(,(kbd "C-x 8 r e") . "е") ;;; CYRILLIC SMALL LETTER IE
(,(kbd "C-x 8 r / y") . "ё") ;;; CYRILLIC SMALL LETTER IO
(,(kbd "C-x 8 r / x") . "ж") ;;; CYRILLIC SMALL LETTER ZHE
(,(kbd "C-x 8 r z") . "з") ;;; CYRILLIC SMALL LETTER ZE
(,(kbd "C-x 8 r i") . "и") ;;; CYRILLIC SMALL LETTER I
(,(kbd "C-x 8 r j") . "й") ;;; CYRILLIC SMALL LETTER SHORT I
(,(kbd "C-x 8 r k") . "к") ;;; CYRILLIC SMALL LETTER KA
(,(kbd "C-x 8 r l") . "л") ;;; CYRILLIC SMALL LETTER EL
(,(kbd "C-x 8 r m") . "м") ;;; CYRILLIC SMALL LETTER EM
(,(kbd "C-x 8 r n") . "н") ;;; CYRILLIC SMALL LETTER EN
(,(kbd "C-x 8 r o") . "о") ;;; CYRILLIC SMALL LETTER O
(,(kbd "C-x 8 r p") . "п") ;;; CYRILLIC SMALL LETTER PE
(,(kbd "C-x 8 r r") . "р") ;;; CYRILLIC SMALL LETTER ER
(,(kbd "C-x 8 r s") . "с") ;;; CYRILLIC SMALL LETTER ES
(,(kbd "C-x 8 r t") . "т") ;;; CYRILLIC SMALL LETTER TE
(,(kbd "C-x 8 r u") . "у") ;;; CYRILLIC SMALL LETTER U
(,(kbd "C-x 8 r f") . "ф") ;;; CYRILLIC SMALL LETTER EF
(,(kbd "C-x 8 r h") . "х") ;;; CYRILLIC SMALL LETTER HA
(,(kbd "C-x 8 r x") . "х") ;;; CYRILLIC SMALL LETTER HA
(,(kbd "C-x 8 r c") . "ц") ;;; CYRILLIC SMALL LETTER TSE
(,(kbd "C-x 8 r / c") . "ч") ;;; CYRILLIC SMALL LETTER CHE
(,(kbd "C-x 8 r / t") . "щ") ;;; CYRILLIC SMALL LETTER SHCHA
(,(kbd "C-x 8 r ~") . "ъ") ;;; CYRILLIC SMALL LETTER HARD SIGN
(,(kbd "C-x 8 r y") . "ы") ;;; CYRILLIC SMALL LETTER YERU
(,(kbd "C-x 8 r '") . "ь") ;;; CYRILLIC SMALL LETTER SOFT SIGN
(,(kbd "C-x 8 r / f") . "э") ;;; CYRILLIC SMALL LETTER E
(,(kbd "C-x 8 r / u") . "ю") ;;; CYRILLIC SMALL LETTER YU
(,(kbd "C-x 8 r q") . "я") ;;; CYRILLIC SMALL LETTER YA
(,(kbd "C-x 8 r / a") . "ї") ;;; CYRILLIC SMALL LETTER YI
(,(kbd "C-x 8 r / d") . "ђ") ;;; CYRILLIC SMALL LETTER DJE
(,(kbd "C-x 8 r / e") . "є") ;;; CYRILLIC SMALL LETTER UKRAINIAN IE
(,(kbd "C-x 8 r / g") . "ѓ") ;;; CYRILLIC SMALL LETTER GJE
(,(kbd "C-x 8 r / h") . "ш") ;;; CYRILLIC SMALL LETTER SHA
(,(kbd "C-x 8 r / i") . "і") ;;; CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
(,(kbd "C-x 8 r / j") . "ј") ;;; CYRILLIC SMALL LETTER JE
(,(kbd "C-x 8 r / k") . "ќ") ;;; CYRILLIC SMALL LETTER KJE
(,(kbd "C-x 8 r / l") . "љ") ;;; CYRILLIC SMALL LETTER LJE
(,(kbd "C-x 8 r / n") . "њ") ;;; CYRILLIC SMALL LETTER NJE
(,(kbd "C-x 8 r / r") . "ћ") ;;; CYRILLIC SMALL LETTER TSHE
(,(kbd "C-x 8 r / s") . "ѕ") ;;; CYRILLIC SMALL LETTER DZE
(,(kbd "C-x 8 r / v") . "ў") ;;; CYRILLIC SMALL LETTER SHORT U
(,(kbd "C-x 8 r / z") . "џ") ;;; CYRILLIC SMALL LETTER DZHE
(,(kbd "C-x 8 r A") . "А") ;;; CYRILLIC CAPITAL LETTER A
(,(kbd "C-x 8 r B") . "Б") ;;; CYRILLIC CAPITAL LETTER BE
(,(kbd "C-x 8 r V") . "В") ;;; CYRILLIC CAPITAL LETTER VE
(,(kbd "C-x 8 r W") . "В") ;;; CYRILLIC CAPITAL LETTER VE
(,(kbd "C-x 8 r G") . "Г") ;;; CYRILLIC CAPITAL LETTER GHE
(,(kbd "C-x 8 r D") . "Д") ;;; CYRILLIC CAPITAL LETTER DE
(,(kbd "C-x 8 r E") . "Е") ;;; CYRILLIC CAPITAL LETTER IE
(,(kbd "C-x 8 r / Y") . "Ё") ;;; CYRILLIC CAPITAL LETTER IO
(,(kbd "C-x 8 r / X") . "Ж") ;;; CYRILLIC CAPITAL LETTER ZHE
(,(kbd "C-x 8 r Z") . "З") ;;; CYRILLIC CAPITAL LETTER ZE
(,(kbd "C-x 8 r I") . "И") ;;; CYRILLIC CAPITAL LETTER I
(,(kbd "C-x 8 r J") . "Й") ;;; CYRILLIC CAPITAL LETTER SHORT I
(,(kbd "C-x 8 r K") . "К") ;;; CYRILLIC CAPITAL LETTER KA
(,(kbd "C-x 8 r L") . "Л") ;;; CYRILLIC CAPITAL LETTER EL
(,(kbd "C-x 8 r M") . "М") ;;; CYRILLIC CAPITAL LETTER EM
(,(kbd "C-x 8 r N") . "Н") ;;; CYRILLIC CAPITAL LETTER EN
(,(kbd "C-x 8 r O") . "О") ;;; CYRILLIC CAPITAL LETTER O
(,(kbd "C-x 8 r P") . "П") ;;; CYRILLIC CAPITAL LETTER PE
(,(kbd "C-x 8 r R") . "Р") ;;; CYRILLIC CAPITAL LETTER ER
(,(kbd "C-x 8 r S") . "С") ;;; CYRILLIC CAPITAL LETTER ES
(,(kbd "C-x 8 r T") . "Т") ;;; CYRILLIC CAPITAL LETTER TE
(,(kbd "C-x 8 r U") . "У") ;;; CYRILLIC CAPITAL LETTER U
(,(kbd "C-x 8 r F") . "Ф") ;;; CYRILLIC CAPITAL LETTER EF
(,(kbd "C-x 8 r H") . "Х") ;;; CYRILLIC CAPITAL LETTER HA
(,(kbd "C-x 8 r X") . "Х") ;;; CYRILLIC CAPITAL LETTER HA
(,(kbd "C-x 8 r C") . "Ц") ;;; CYRILLIC CAPITAL LETTER TSE
(,(kbd "C-x 8 r / C") . "Ч") ;;; CYRILLIC CAPITAL LETTER CHE
(,(kbd "C-x 8 r / T") . "Щ") ;;; CYRILLIC CAPITAL LETTER SHCHA
(,(kbd "C-x 8 r C-~") . "Ъ") ;;; CYRILLIC CAPITAL LETTER HARD SIGN
(,(kbd "C-x 8 r Y") . "Ы") ;;; CYRILLIC CAPITAL LETTER YERU
(,(kbd "C-x 8 r C-'") . "Ь") ;;; CYRILLIC CAPITAL LETTER SOFT SIGN
(,(kbd "C-x 8 r / F") . "Э") ;;; CYRILLIC CAPITAL LETTER E
(,(kbd "C-x 8 r / U") . "Ю") ;;; CYRILLIC CAPITAL LETTER YU
(,(kbd "C-x 8 r Q") . "Я") ;;; CYRILLIC CAPITAL LETTER YA
(,(kbd "C-x 8 r / A") . "Ї") ;;; CYRILLIC CAPITAL LETTER YI
(,(kbd "C-x 8 r / D") . "Ђ") ;;; CYRILLIC CAPITAL LETTER DJE
(,(kbd "C-x 8 r / E") . "Є") ;;; CYRILLIC CAPITAL LETTER UKRAINIAN IE
(,(kbd "C-x 8 r / G") . "Ѓ") ;;; CYRILLIC CAPITAL LETTER GJE
(,(kbd "C-x 8 r / H") . "Ш") ;;; CYRILLIC CAPITAL LETTER SHA
(,(kbd "C-x 8 r / I") . "І") ;;; CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
(,(kbd "C-x 8 r / J") . "Ј") ;;; CYRILLIC CAPITAL LETTER JE
(,(kbd "C-x 8 r / K") . "Ќ") ;;; CYRILLIC CAPITAL LETTER KJE
(,(kbd "C-x 8 r / L") . "Љ") ;;; CYRILLIC CAPITAL LETTER LJE
(,(kbd "C-x 8 r / N") . "Њ") ;;; CYRILLIC CAPITAL LETTER NJE
(,(kbd "C-x 8 r / R") . "Ћ") ;;; CYRILLIC CAPITAL LETTER TSHE
(,(kbd "C-x 8 r / S") . "Ѕ") ;;; CYRILLIC CAPITAL LETTER DZE
(,(kbd "C-x 8 r / V") . "Ў") ;;; CYRILLIC CAPITAL LETTER SHORT U
(,(kbd "C-x 8 r / Z") . "Џ") ;;; CYRILLIC CAPITAL LETTER DZHE
)
"A list of cons cells whose CAR is a key sequence and CDR a
Unicode character. For each such cons cell, the key sequence
is bound to insertion of the associated Unicode character when
the minor mode `unicode-keymap-extensions-mode' is active."
:tag "Unicode keymap-extensions bindings"
:version "25.1"
:group 'unicode-keymap-extensions
:type '(repeat (cons key-sequence character)))
(defun init-extensions-keymap (bindings-sym)
"Initialize keymap given BINDINGS-SYM, a list of (key-sequence
. char) bindings."
(let ((map (make-sparse-keymap)))
(mapc
(lambda (binding)
(define-key map (car binding) (cdr binding)))
(symbol-value bindings-sym))
map))
;;;###autoload
(define-minor-mode unicode-keymap-extensions-mode
"Toggles variable `unicode-keymap-extensions-mode'.
Interactively with no argument, this command toggles the mode.
With a positive prefix argument, enables the mode. With any other
prefix argument, disables it.
From Lisp (i.e., non-interactively), argument omitted or nil
enables the mode, `toggle' toggles the state.
`unicode-keymap-extensions-mode' is a minor mode that provides
extended Unicode input bindings, as per custom variable
`unicode-keymap-extensions-bindings'."
;;; No initial value.
:init-value nil
;;; No mode line indicator.
:lighter nil
;;; Minor mode keymap
:keymap (init-extensions-keymap 'unicode-keymap-extensions-bindings)
;;; Gobal variable `unicode-keymap-extensions-mode'.
:global t
;;; Customization group
:group 'unicode-keymap-extensions
)
;;; `unicode-keymap-extensions-local-mode' valid only for Emacs 25+.
;;;###autoload
(define-minor-mode unicode-keymap-extensions-local-mode
"Toggle `unicode-keymap-extensions-mode' only in this buffer."
:variable (buffer-local-value 'unicode-keymap-extensions-mode
(current-buffer))
(cond
((eq unicode-keymap-extensions-mode
(default-value 'unicode-keymap-extensions-mode))
(kill-local-variable 'unicode-keymap-extensions-mode))
((not (default-value 'unicode-keymap-extensions-mode))
;;; Enable locally.
(unicode-keymap-extensions-mode)
;;; Disable globally elsewhere.
(setq-default unicode-keymap-extensions-mode nil)
)))
(provide 'unicode-keymap-extensions)