Mercurial > emacs
annotate lisp/international/iso-acc.el @ 5031:cad49955c59e
(HAVE_GETTIMEOFDAY): Don't define if already defined.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 15 Nov 1993 12:27:45 +0000 |
parents | fb527936ca61 |
children | 34ce5cc32eb8 |
rev | line source |
---|---|
4720 | 1 ;;; iso-acc.el -- minor mode providing electric accent keys |
2 ;;; Copyright (C) 1993 Free Software Foundation, Inc. | |
3 | |
4 ;; Author: Johan Vromans <jv@mh.nl> | |
4733
4d378f483cf4
Set up keymap at load time.
Richard M. Stallman <rms@gnu.org>
parents:
4721
diff
changeset
|
5 ;; Version: 1.7 |
4921
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
6 ;; Maintainer: FSF |
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
7 ;; Keywords: i18n |
4720 | 8 |
9 ;; This file is part of GNU Emacs. | |
10 | |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
12 ;; it under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with GNU Emacs; see the file COPYING. If not, write to | |
23 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
24 | |
25 ;;; Commentary: | |
26 | |
4733
4d378f483cf4
Set up keymap at load time.
Richard M. Stallman <rms@gnu.org>
parents:
4721
diff
changeset
|
27 ;; Function `iso-accents-mode' activates a minor mode |
4d378f483cf4
Set up keymap at load time.
Richard M. Stallman <rms@gnu.org>
parents:
4721
diff
changeset
|
28 ;; (`iso-accents-minor-mode') in which typewriter "dead keys" are |
4d378f483cf4
Set up keymap at load time.
Richard M. Stallman <rms@gnu.org>
parents:
4721
diff
changeset
|
29 ;; emulated. The purpose of this emulation is to provide a simple |
4d378f483cf4
Set up keymap at load time.
Richard M. Stallman <rms@gnu.org>
parents:
4721
diff
changeset
|
30 ;; means for inserting accented characters according to the ISO-8859-1 |
4d378f483cf4
Set up keymap at load time.
Richard M. Stallman <rms@gnu.org>
parents:
4721
diff
changeset
|
31 ;; character set. |
4720 | 32 ;; |
33 ;; In `iso-accents-minor-mode', pseudo accent characters are used to | |
34 ;; introduce accented keys. The pseudo-accent characterss are: | |
35 ;; | |
36 ;; ' (minute) -> grave accent | |
37 ;; ` (backtick) -> acute accent | |
38 ;; " (second) -> diaeresis | |
4921
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
39 ;; ^ (caret) -> circumflex |
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
40 ;; ~ (tilde) -> tilde over the character |
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
41 ;; / (slash) -> slash through the character. |
4720 | 42 ;; |
43 ;; The action taken depends on the key that follows the pseudo accent. | |
44 ;; In general: | |
45 ;; | |
46 ;; pseudo-accent + appropriate letter -> accented letter | |
47 ;; pseudo-accent + space -> pseudo-accent | |
48 ;; pseudo-accent + pseudo-accent -> accent (if available) | |
49 ;; pseudo-accent + other -> pseudo-accent + other | |
50 ;; | |
51 ;; If the pseudo-accent is followed by anything else than a | |
52 ;; self-insert-command, the dead-key code is terminated, the | |
53 ;; pseudo-accent inserted 'as is' and the bell is rung to signal this. | |
54 ;; | |
4721
d34c02ddea9f
Fix lots of doc strings.
Richard M. Stallman <rms@gnu.org>
parents:
4720
diff
changeset
|
55 ;; Function `iso-accents-mode' can be used to enable the iso accents |
d34c02ddea9f
Fix lots of doc strings.
Richard M. Stallman <rms@gnu.org>
parents:
4720
diff
changeset
|
56 ;; minor mode, or disable it. |
4720 | 57 |
58 ;;; Code: | |
59 | |
60 (provide 'iso-acc) | |
61 | |
62 (defvar iso-accents-list | |
63 '(((?' ?A) ?\301) | |
64 ((?' ?E) ?\311) | |
65 ((?' ?I) ?\315) | |
66 ((?' ?O) ?\323) | |
67 ((?' ?U) ?\332) | |
4921
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
68 ((?' ?Y) ?\335) |
4720 | 69 ((?' ?a) ?\341) |
70 ((?' ?e) ?\351) | |
71 ((?' ?i) ?\355) | |
72 ((?' ?o) ?\363) | |
73 ((?' ?u) ?\372) | |
4921
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
74 ((?' ?Y) ?\375) |
4720 | 75 ((?' ?') ?\264) |
76 ((?' ? ) ?') | |
77 ((?` ?A) ?\300) | |
78 ((?` ?E) ?\310) | |
79 ((?` ?I) ?\314) | |
80 ((?` ?O) ?\322) | |
81 ((?` ?U) ?\331) | |
82 ((?` ?a) ?\340) | |
83 ((?` ?e) ?\350) | |
84 ((?` ?i) ?\354) | |
85 ((?` ?o) ?\362) | |
86 ((?` ?u) ?\371) | |
87 ((?` ? ) ?`) | |
88 ((?` ?`) ?`) ; no special code? | |
4922
60ef6d1946b0
(iso-accents-list): Fix typo in ^A code. Support ~< and ~>.
Richard M. Stallman <rms@gnu.org>
parents:
4921
diff
changeset
|
89 ((?^ ?A) ?\302) |
4720 | 90 ((?^ ?E) ?\312) |
91 ((?^ ?I) ?\316) | |
92 ((?^ ?O) ?\324) | |
93 ((?^ ?U) ?\333) | |
94 ((?^ ?a) ?\342) | |
95 ((?^ ?e) ?\352) | |
96 ((?^ ?i) ?\356) | |
97 ((?^ ?o) ?\364) | |
98 ((?^ ?u) ?\373) | |
99 ((?^ ? ) ?^) | |
100 ((?^ ?^) ?^) ; no special code? | |
101 ((?\" ?A) ?\304) | |
102 ((?\" ?E) ?\313) | |
103 ((?\" ?I) ?\317) | |
104 ((?\" ?O) ?\326) | |
105 ((?\" ?U) ?\334) | |
106 ((?\" ?a) ?\344) | |
107 ((?\" ?e) ?\353) | |
108 ((?\" ?i) ?\357) | |
109 ((?\" ?o) ?\366) | |
110 ((?\" ?u) ?\374) | |
4921
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
111 ((?\" ?y) ?\377) |
4720 | 112 ((?\" ? ) ?\") |
113 ((?\" ?\") ?\250) | |
4921
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
114 ((?\~ ?A) ?\303) |
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
115 ((?\~ ?C) ?\307) |
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
116 ((?\~ ?D) ?\320) |
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
117 ((?\~ ?N) ?\321) |
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
118 ((?\~ ?O) ?\325) |
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
119 ((?\~ ?a) ?\343) |
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
120 ((?\~ ?c) ?\307) |
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
121 ((?\~ ?d) ?\360) |
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
122 ((?\~ ?n) ?\361) |
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
123 ((?\~ ?o) ?\365) |
4922
60ef6d1946b0
(iso-accents-list): Fix typo in ^A code. Support ~< and ~>.
Richard M. Stallman <rms@gnu.org>
parents:
4921
diff
changeset
|
124 ((?\~ ?>) ?\273) |
60ef6d1946b0
(iso-accents-list): Fix typo in ^A code. Support ~< and ~>.
Richard M. Stallman <rms@gnu.org>
parents:
4921
diff
changeset
|
125 ((?\~ ?<) ?\253) |
4921
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
126 ((?\/ ?O) ?\330) |
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
127 ((?\/ ?o) ?\370) |
4720 | 128 ) |
4721
d34c02ddea9f
Fix lots of doc strings.
Richard M. Stallman <rms@gnu.org>
parents:
4720
diff
changeset
|
129 "Association list for ISO accent combinations.") |
4720 | 130 |
131 (defvar iso-accents-minor-mode nil | |
4924
fb527936ca61
(iso-accents-mode): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
4922
diff
changeset
|
132 "*Non-nil enables ISO Accents mode. |
4733
4d378f483cf4
Set up keymap at load time.
Richard M. Stallman <rms@gnu.org>
parents:
4721
diff
changeset
|
133 Setting this variable makes it local to the current buffer. |
4734
488d0b668380
Fix typo in previous change.
Richard M. Stallman <rms@gnu.org>
parents:
4733
diff
changeset
|
134 See `iso-accents-mode'.") |
4733
4d378f483cf4
Set up keymap at load time.
Richard M. Stallman <rms@gnu.org>
parents:
4721
diff
changeset
|
135 (make-variable-buffer-local 'iso-accents-minor-mode) |
4720 | 136 |
4877
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
137 (defun iso-accents-accent-key (prompt) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
138 "Modify the following character by adding an accent to it." |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
139 ;; Pick up the accent character. |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
140 (if iso-accents-minor-mode |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
141 (iso-accents-compose prompt) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
142 (char-to-string last-input-char))) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
143 |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
144 (defun iso-accents-compose-key (prompt) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
145 "Modify the following character by adding an accent to it." |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
146 ;; Pick up the accent character. |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
147 (let ((combined (iso-accents-compose prompt))) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
148 (if unread-command-events |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
149 (let ((unread unread-command-events)) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
150 (setq unread-command-events nil) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
151 (error "Characters %s and %s cannot be composed" |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
152 (single-key-description (aref combined 0)) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
153 (single-key-description (car unread))))) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
154 combined)) |
4720 | 155 |
4877
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
156 (defun iso-accents-compose (prompt) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
157 (let* ((first-char last-input-char) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
158 ;; Wait for the second key and look up the combination. |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
159 (second-char (if (or prompt |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
160 (not (eq (key-binding "a") |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
161 'self-insert-command))) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
162 (progn |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
163 (message "%s%c" |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
164 (or prompt "Compose with ") |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
165 first-char) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
166 (read-event)) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
167 (insert first-char) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
168 (prog1 (read-event) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
169 (delete-region (1- (point)) (point))))) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
170 (entry (assoc (list first-char second-char) iso-accents-list))) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
171 (if entry |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
172 ;; Found it: delete the first character and insert the combination. |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
173 (concat (list (nth 1 entry))) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
174 ;; Otherwise, advance and schedule the second key for execution. |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
175 (setq unread-command-events (list second-char)) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
176 (vector first-char)))) |
4733
4d378f483cf4
Set up keymap at load time.
Richard M. Stallman <rms@gnu.org>
parents:
4721
diff
changeset
|
177 |
4877
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
178 (or key-translation-map (setq key-translation-map (make-sparse-keymap))) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
179 ;; For sequences starting with an accent character, |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
180 ;; use a function that tests iso-accents-minor-mode. |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
181 (define-key key-translation-map "'" 'iso-accents-accent-key) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
182 (define-key key-translation-map "`" 'iso-accents-accent-key) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
183 (define-key key-translation-map "^" 'iso-accents-accent-key) |
4c51d8a8b09f
Define "dead keys" in key-translation-map, not in global-map.
Richard M. Stallman <rms@gnu.org>
parents:
4734
diff
changeset
|
184 (define-key key-translation-map "\"" 'iso-accents-accent-key) |
4921
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
185 (define-key key-translation-map "~" 'iso-accents-accent-key) |
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
186 (define-key key-translation-map "/" 'iso-accents-accent-key) |
4733
4d378f483cf4
Set up keymap at load time.
Richard M. Stallman <rms@gnu.org>
parents:
4721
diff
changeset
|
187 |
4720 | 188 ;; It is a matter of taste if you want the minor mode indicated |
189 ;; in the mode line... | |
4733
4d378f483cf4
Set up keymap at load time.
Richard M. Stallman <rms@gnu.org>
parents:
4721
diff
changeset
|
190 ;; If so, uncomment the next four lines. |
4720 | 191 ;; (or (assq 'iso-accents-minor-mode minor-mode-map-alist) |
192 ;; (setq minor-mode-alist | |
193 ;; (append minor-mode-alist | |
194 ;; '((iso-accents-minor-mode " ISO-Acc"))))) | |
195 | |
196 ;;;###autoload | |
4721
d34c02ddea9f
Fix lots of doc strings.
Richard M. Stallman <rms@gnu.org>
parents:
4720
diff
changeset
|
197 (defun iso-accents-mode (&optional arg) |
4924
fb527936ca61
(iso-accents-mode): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
4922
diff
changeset
|
198 "Toggle ISO Accents mode, in which accents modify the following letter. |
4721
d34c02ddea9f
Fix lots of doc strings.
Richard M. Stallman <rms@gnu.org>
parents:
4720
diff
changeset
|
199 This permits easy insertion of accented characters according to ISO-8859-1. |
d34c02ddea9f
Fix lots of doc strings.
Richard M. Stallman <rms@gnu.org>
parents:
4720
diff
changeset
|
200 When Iso-accents mode is enabled, accent character keys |
4921
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
201 \(`, ', \", ^, / and ~) do not self-insert; instead, they modify the following |
4721
d34c02ddea9f
Fix lots of doc strings.
Richard M. Stallman <rms@gnu.org>
parents:
4720
diff
changeset
|
202 letter key so that it inserts an ISO accented letter. |
d34c02ddea9f
Fix lots of doc strings.
Richard M. Stallman <rms@gnu.org>
parents:
4720
diff
changeset
|
203 |
4921
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
204 Special combinations: ~c gives a c with cedilla, |
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
205 ~d gives a d with dash. |
4922
60ef6d1946b0
(iso-accents-list): Fix typo in ^A code. Support ~< and ~>.
Richard M. Stallman <rms@gnu.org>
parents:
4921
diff
changeset
|
206 ~< and ~> give guillemets. |
4921
e96cc77d9a7c
Support ~ and /. Support 'Y, 'y, "y.
Richard M. Stallman <rms@gnu.org>
parents:
4877
diff
changeset
|
207 |
4721
d34c02ddea9f
Fix lots of doc strings.
Richard M. Stallman <rms@gnu.org>
parents:
4720
diff
changeset
|
208 With an argument, a positive argument enables ISO-accents mode, |
d34c02ddea9f
Fix lots of doc strings.
Richard M. Stallman <rms@gnu.org>
parents:
4720
diff
changeset
|
209 and a negative argument disables it." |
4720 | 210 |
211 (interactive "P") | |
212 | |
4721
d34c02ddea9f
Fix lots of doc strings.
Richard M. Stallman <rms@gnu.org>
parents:
4720
diff
changeset
|
213 (if (if arg |
d34c02ddea9f
Fix lots of doc strings.
Richard M. Stallman <rms@gnu.org>
parents:
4720
diff
changeset
|
214 ;; Negative arg means switch it off. |
d34c02ddea9f
Fix lots of doc strings.
Richard M. Stallman <rms@gnu.org>
parents:
4720
diff
changeset
|
215 (<= (prefix-numeric-value arg) 0) |
d34c02ddea9f
Fix lots of doc strings.
Richard M. Stallman <rms@gnu.org>
parents:
4720
diff
changeset
|
216 ;; No arg means toggle. |
d34c02ddea9f
Fix lots of doc strings.
Richard M. Stallman <rms@gnu.org>
parents:
4720
diff
changeset
|
217 iso-accents-minor-mode) |
4720 | 218 (setq iso-accents-minor-mode nil) |
219 | |
220 ;; Enable electric accents. | |
4733
4d378f483cf4
Set up keymap at load time.
Richard M. Stallman <rms@gnu.org>
parents:
4721
diff
changeset
|
221 (setq iso-accents-minor-mode t))) |
4720 | 222 |
223 ;;; iso-acc.el ends here |