summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-11-21 22:54:37 +0000
committerRichard M. Stallman <rms@gnu.org>1993-11-21 22:54:37 +0000
commit0b689e5e3d1f2f085887f19a8d39bd9b4e533143 (patch)
tree5da30cd15d2268539c2e35cda57798ca92a13f6c /lisp
parent28f61b41f749e2f307d286f63ec78d3b3212b2f5 (diff)
downloademacs-0b689e5e3d1f2f085887f19a8d39bd9b4e533143.tar.gz
(iso-accents-enable): New variable.
(key-translation-map): Enable an accent only if in iso-accents-enable.
Diffstat (limited to 'lisp')
-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 @@
;;
;; Function `iso-accents-mode' can be used to enable the iso accents
;; minor mode, or disable it.
+
+;; If you want only some of these characters to serve as accents,
+;; set iso-accents-enable to the list of characters that should be special.
;;; Code:
@@ -181,15 +184,27 @@ See `iso-accents-mode'.")
(setq unread-command-events (list second-char))
(vector first-char))))
+(defvar iso-accents-enable '(?' ?` ?^ ?\" ?~ ?/)
+ "*List of accent keys that become prefixes in ISO Accents mode.
+The default is (?' ?` ?^ ?\" ?~ ?/), which contains all the supported
+accent keys. For certain languages, you might want to remove some of
+those characters that are not actually used.")
+
(or key-translation-map (setq key-translation-map (make-sparse-keymap)))
;; For sequences starting with an accent character,
;; use a function that tests iso-accents-minor-mode.
-(define-key key-translation-map "'" 'iso-accents-accent-key)
-(define-key key-translation-map "`" 'iso-accents-accent-key)
-(define-key key-translation-map "^" 'iso-accents-accent-key)
-(define-key key-translation-map "\"" 'iso-accents-accent-key)
-(define-key key-translation-map "~" 'iso-accents-accent-key)
-(define-key key-translation-map "/" 'iso-accents-accent-key)
+(if (memq ?' iso-accents-enable)
+ (define-key key-translation-map "'" 'iso-accents-accent-key))
+(if (memq ?` iso-accents-enable)
+ (define-key key-translation-map "`" 'iso-accents-accent-key))
+(if (memq ?^ iso-accents-enable)
+ (define-key key-translation-map "^" 'iso-accents-accent-key))
+(if (memq ?\" iso-accents-enable)
+ (define-key key-translation-map "\"" 'iso-accents-accent-key))
+(if (memq ?~ iso-accents-enable)
+ (define-key key-translation-map "~" 'iso-accents-accent-key))
+(if (memq ?/ iso-accents-enable)
+ (define-key key-translation-map "/" 'iso-accents-accent-key))
;; It is a matter of taste if you want the minor mode indicated
;; in the mode line...
@@ -207,6 +222,10 @@ When Iso-accents mode is enabled, accent character keys
\(`, ', \", ^, / and ~) do not self-insert; instead, they modify the following
letter key so that it inserts an ISO accented letter.
+The variable `iso-accents-enable' specifies the list of characters to
+enable as accents. If you don't need all of them, remove the ones you
+don't need from that list.
+
Special combinations: ~c gives a c with cedilla,
~d gives a d with dash.
\"s gives German sharp s.
@@ -214,7 +233,7 @@ Special combinations: ~c gives a c with cedilla,
/e gives an a-e ligature.
~< and ~> give guillemets.
-With an argument, a positive argument enables ISO-accents mode,
+With an argument, a positive argument enables ISO Accents mode,
and a negative argument disables it."
(interactive "P")