aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-11-21 22:54:37 +0000
committerRichard M. Stallman1993-11-21 22:54:37 +0000
commit6da676adec0943adc2e143b036d0a7fddae548db (patch)
tree830e1254d72c33860ef1a27f4906bcbb24b39b67
parentc818754bc1f883c54b736619b432cec54c6e11ab (diff)
downloademacs-6da676adec0943adc2e143b036d0a7fddae548db.tar.gz
emacs-6da676adec0943adc2e143b036d0a7fddae548db.zip
(iso-accents-enable): New variable.
(key-translation-map): Enable an accent only if in iso-accents-enable.
-rw-r--r--lisp/international/iso-acc.el33
1 files changed, 26 insertions, 7 deletions
diff --git a/lisp/international/iso-acc.el b/lisp/international/iso-acc.el
index c57a83b78de..aacd10242b5 100644
--- a/lisp/international/iso-acc.el
+++ b/lisp/international/iso-acc.el
@@ -55,6 +55,9 @@
55;; 55;;
56;; Function `iso-accents-mode' can be used to enable the iso accents 56;; Function `iso-accents-mode' can be used to enable the iso accents
57;; minor mode, or disable it. 57;; minor mode, or disable it.
58
59;; If you want only some of these characters to serve as accents,
60;; set iso-accents-enable to the list of characters that should be special.
58 61
59;;; Code: 62;;; Code:
60 63
@@ -181,15 +184,27 @@ See `iso-accents-mode'.")
181 (setq unread-command-events (list second-char)) 184 (setq unread-command-events (list second-char))
182 (vector first-char)))) 185 (vector first-char))))
183 186
187(defvar iso-accents-enable '(?' ?` ?^ ?\" ?~ ?/)
188 "*List of accent keys that become prefixes in ISO Accents mode.
189The default is (?' ?` ?^ ?\" ?~ ?/), which contains all the supported
190accent keys. For certain languages, you might want to remove some of
191those characters that are not actually used.")
192
184(or key-translation-map (setq key-translation-map (make-sparse-keymap))) 193(or key-translation-map (setq key-translation-map (make-sparse-keymap)))
185;; For sequences starting with an accent character, 194;; For sequences starting with an accent character,
186;; use a function that tests iso-accents-minor-mode. 195;; use a function that tests iso-accents-minor-mode.
187(define-key key-translation-map "'" 'iso-accents-accent-key) 196(if (memq ?' iso-accents-enable)
188(define-key key-translation-map "`" 'iso-accents-accent-key) 197 (define-key key-translation-map "'" 'iso-accents-accent-key))
189(define-key key-translation-map "^" 'iso-accents-accent-key) 198(if (memq ?` iso-accents-enable)
190(define-key key-translation-map "\"" 'iso-accents-accent-key) 199 (define-key key-translation-map "`" 'iso-accents-accent-key))
191(define-key key-translation-map "~" 'iso-accents-accent-key) 200(if (memq ?^ iso-accents-enable)
192(define-key key-translation-map "/" 'iso-accents-accent-key) 201 (define-key key-translation-map "^" 'iso-accents-accent-key))
202(if (memq ?\" iso-accents-enable)
203 (define-key key-translation-map "\"" 'iso-accents-accent-key))
204(if (memq ?~ iso-accents-enable)
205 (define-key key-translation-map "~" 'iso-accents-accent-key))
206(if (memq ?/ iso-accents-enable)
207 (define-key key-translation-map "/" 'iso-accents-accent-key))
193 208
194;; It is a matter of taste if you want the minor mode indicated 209;; It is a matter of taste if you want the minor mode indicated
195;; in the mode line... 210;; in the mode line...
@@ -207,6 +222,10 @@ When Iso-accents mode is enabled, accent character keys
207\(`, ', \", ^, / and ~) do not self-insert; instead, they modify the following 222\(`, ', \", ^, / and ~) do not self-insert; instead, they modify the following
208letter key so that it inserts an ISO accented letter. 223letter key so that it inserts an ISO accented letter.
209 224
225The variable `iso-accents-enable' specifies the list of characters to
226enable as accents. If you don't need all of them, remove the ones you
227don't need from that list.
228
210Special combinations: ~c gives a c with cedilla, 229Special combinations: ~c gives a c with cedilla,
211~d gives a d with dash. 230~d gives a d with dash.
212\"s gives German sharp s. 231\"s gives German sharp s.
@@ -214,7 +233,7 @@ Special combinations: ~c gives a c with cedilla,
214/e gives an a-e ligature. 233/e gives an a-e ligature.
215~< and ~> give guillemets. 234~< and ~> give guillemets.
216 235
217With an argument, a positive argument enables ISO-accents mode, 236With an argument, a positive argument enables ISO Accents mode,
218and a negative argument disables it." 237and a negative argument disables it."
219 238
220 (interactive "P") 239 (interactive "P")