carbon2-commit: Vastly expand the characters x-compose.el supports.
16 years, 6 months
Aidan Kehoe
changeset: 4668:fdc76fec36d3ce3b9023a37d4d720db2cf24a1b3
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Mar 01 11:11:46 2009 +0000
files: lisp/ChangeLog lisp/x-compose.el lisp/x-init.el
description:
Vastly expand the characters x-compose.el supports.
2009-03-01 Aidan Kehoe <kehoea(a)parhasard.net>
* x-compose.el:
Document an XIM bug, and how one might work around it.
(define-compose-map):
Revise this macro, call it with compose-caron-map,
compose-macron-map, compose-breve-map, compose-dot-map,
compose-doubleacute-map, compose-ogonek-map, compose-hook-map,
compose-horn-map as well as the previous existing maps.
(compose-map):
Add entries for caron, macron, doubleacute, ogonek, breve and
abovedot to this map.
Add an assert, this code assumes that a non-Mule build has no
character codes above U+00FF.
Incorporate all the precomposed Latin characters in
UnicodeData.txt that we can into the maps, deciding at runtime on
which exactly depending on whether this is a non-Mule or a Mule
build.
Remove a commented-out old X11 bug workaround.
Use #'flet instead of defun + unintern for
#'alias-colon-to-doublequote.
Correct #'electric-diacritic to work with the keyboard macro
versions of the maps.
(compose-help):
This has been turned off since 1994; no-one appears to have
noticed, since the normal help mechanism offers similar
functionality and is actually maintained. Removed entirely.
Remove a superflous setting of a default value for ctl-arrow.
* x-init.el (x-initialize-compose):
Support the new dead key maps we just added to x-compose.el with
autoloads here.
diff -r f1bb4cc3144a3a4b1f9431cbaa3adc9938357354 -r fdc76fec36d3ce3b9023a37d4d720db2cf24a1b3 lisp/ChangeLog
--- a/lisp/ChangeLog Thu Feb 26 18:35:11 2009 +0900
+++ b/lisp/ChangeLog Sun Mar 01 11:11:46 2009 +0000
@@ -1,3 +1,35 @@ 2009-02-22 Aidan Kehoe <kehoea@parhasa
+2009-03-01 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * x-compose.el:
+ Document an XIM bug, and how one might work around it.
+ (define-compose-map):
+ Revise this macro, call it with compose-caron-map,
+ compose-macron-map, compose-breve-map, compose-dot-map,
+ compose-doubleacute-map, compose-ogonek-map, compose-hook-map,
+ compose-horn-map as well as the previous existing maps.
+ (compose-map):
+ Add entries for caron, macron, doubleacute, ogonek, breve and
+ abovedot to this map.
+ Add an assert, this code assumes that a non-Mule build has no
+ character codes above U+00FF.
+ Incorporate all the precomposed Latin characters in
+ UnicodeData.txt that we can into the maps, deciding at runtime on
+ which exactly depending on whether this is a non-Mule or a Mule
+ build.
+ Remove a commented-out old X11 bug workaround.
+ Use #'flet instead of defun + unintern for
+ #'alias-colon-to-doublequote.
+ Correct #'electric-diacritic to work with the keyboard macro
+ versions of the maps.
+ (compose-help):
+ This has been turned off since 1994; no-one appears to have
+ noticed, since the normal help mechanism offers similar
+ functionality and is actually maintained. Removed entirely.
+ Remove a superflous setting of a default value for ctl-arrow.
+ * x-init.el (x-initialize-compose):
+ Support the new dead key maps we just added to x-compose.el with
+ autoloads here.
+
2009-02-22 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp.el (byte-compile-force-escape-quoted): New variable,
diff -r f1bb4cc3144a3a4b1f9431cbaa3adc9938357354 -r fdc76fec36d3ce3b9023a37d4d720db2cf24a1b3 lisp/x-compose.el
--- a/lisp/x-compose.el Thu Feb 26 18:35:11 2009 +0900
+++ b/lisp/x-compose.el Sun Mar 01 11:11:46 2009 +0000
@@ -100,29 +100,63 @@
;; not have: at any point you can type C-h to get a list of the possible
;; completions of what you have typed so far.
+;; ----------------------------------------------------------------------
+;;
+;; Notes from Aidan Kehoe, Thu Feb 12 16:21:18 GMT 2009 (these conflict to
+;; some extent with the above):
+
;; Giacomo Boffi's problem of
;; 20050324103919.8D22E4901(a)boffi95.stru.polimi.it is caused by Xlib doing
-;; the compose processing. To turn that off, I'm not certain what's
-;; possible, beyond making C the current locale.
+;; the compose processing. To turn that off, you need to recompile without
+;; XIM support, or start up XEmacs in a locale that the system supports but
+;; X11 does not (for me, ru_RU.CP866 works for this). This will be
+;; preferable anyway for some people, because the XIM support drops
+;; sequences we would prefer to see. E.g. in the following situation, with
+;; an XIM build:
+
+;; $ LC_CTYPE=de_DE.ISO8859-1 ./xemacs -vanilla &
+
+;; Input: dead-acute a
+;; Seen by XEmacs: aacute (thanks to XIM)
+;; Action: U+00E1 is inserted in the buffer
+
+;; Input: dead-abovedot o
+;; Seen by XEmacs: dead-abovedot o (XIM does not intervene, since no
+;; characters in this locale are generated with
+;; dead-abovedot)
+;; Action: U+022F is inserted in the buffer (thanks to this file)
+
+;; Input: dead-acute r
+;; Seen by XEmacs: nothing (thanks to XIM, it considers U+0155 unavailable)
+;; Action: nothing
+
+;; Without XIM, all the above inputs would work fine, independent of your
+;; locale.
+
+;; Also, XIM does not intervene at all with the second or subsequent X11
+;; devices created, and this file is needed for compose processing
+;; there. This may be a bug in our use of XIM, or it may a bug in XIM
+;; itself.
;;; Code:
(macrolet
- ((define-compose-map (keymap-symbol)
- `(progn
- (defconst ,keymap-symbol (make-sparse-keymap ',keymap-symbol))
+ ((define-compose-map (&rest keymap-symbols)
+ (loop
+ for keymap-symbol in keymap-symbols
+ with result = nil
+ do
;; Required to tell XEmacs the keymaps were actually autoloaded.
;; #### Make this unnecessary!
- (fset ',keymap-symbol ,keymap-symbol))))
-
- (define-compose-map compose-map)
- (define-compose-map compose-acute-map)
- (define-compose-map compose-grave-map)
- (define-compose-map compose-cedilla-map)
- (define-compose-map compose-diaeresis-map)
- (define-compose-map compose-circumflex-map)
- (define-compose-map compose-tilde-map)
- (define-compose-map compose-ring-map))
+ (push `(fset ',keymap-symbol ,keymap-symbol) result)
+ (push `(defconst ,keymap-symbol (make-sparse-keymap ',keymap-symbol))
+ result)
+ finally return (cons 'progn result))))
+ (define-compose-map compose-map compose-acute-map compose-grave-map
+ compose-cedilla-map compose-diaeresis-map compose-circumflex-map
+ compose-tilde-map compose-ring-map compose-caron-map compose-macron-map
+ compose-breve-map compose-dot-map compose-doubleacute-map
+ compose-ogonek-map compose-hook-map compose-horn-map))
(define-key compose-map 'acute compose-acute-map)
(define-key compose-map 'grave compose-grave-map)
@@ -131,6 +165,12 @@
(define-key compose-map 'circumflex compose-circumflex-map)
(define-key compose-map 'tilde compose-tilde-map)
(define-key compose-map 'degree compose-ring-map)
+(define-key compose-map 'caron compose-caron-map)
+(define-key compose-map 'macron compose-macron-map)
+(define-key compose-map 'doubleacute compose-doubleacute-map)
+(define-key compose-map 'ogonek compose-ogonek-map)
+(define-key compose-map 'breve compose-breve-map)
+(define-key compose-map 'abovedot compose-dot-map)
;;(define-key function-key-map [multi-key] compose-map)
@@ -156,119 +196,375 @@
(define-key compose-map [degree] compose-ring-map)
(define-key compose-map [?*] compose-ring-map)
+(loop
+ for (keysym character-code map)
+ in '((caron #x02C7 compose-caron-map)
+ (macron #x00AF compose-macron-map)
+ (doubleacute #x02DD compose-doubleacute-map)
+ (ogonek #x02db compose-ogonek-map)
+ (breve #x0306 compose-breve-map)
+ (abovedot #x0307 compose-dot-map)
+ (U031b #x031b compose-horn-map))
+ do
+ (define-key compose-map (vector keysym) map)
+ (when (setq character-code (decode-char 'ucs character-code))
+ (define-key compose-map (vector character-code) map)))
+
;;; The contents of the "dead key" maps. These are shared by the
;;; compose-map.
-;;; These used to all have nice readable X11-oriented keysym names as the
-;;; macro definition in the third argument, but I moved the interpretation
-;;; of those mappings (that is, Aacute to \301, &c.) to runtime in the X11
-;;; code on first sight of the symbols--which is the more general solution,
-;;; what with Unicode keysyms, publishing, technical and so on, there's no
-;;; need to have them hanging around as symbols all the time--so they're no
-;;; longer available to Lisp before X11 sees them, something this relied on.
-
-;;; The transformation was done like so;
-
-;;; (while (re-search-forward "\\[\\([a-zA-Z]+\\)\\])$" nil t)
-;;; (replace-match (format "(?\\%o)"
-;;; (get (intern (match-string 1)) 'character-of-keysym))
-;;; t t nil 1))
-
-;;; with a lot of repeated calling of setxkbmap to esoteric keymaps--so
-;;; x_reset_key_mapping gets called for all the keys on the keyboard--yacute
-;;; getting picked up from the Czech keymap, idiaeresis from the Dutch one,
-;;; and many more (al, ca, cz, de, dvorak, ee, es, fi, fr, hu,
-;;; ie(UnicodeExpert), it, nl, pt, ro, tr, us, vn, if it interests you.)
-
-;;; The parentheses inside the vector are because otherwise the macro gets
-;;; interpreted as a meta character, the Latin-1 codes being in exactly that
-;;; range. Perhaps that bears documenting somewhere. Also, why is help
-;;; turned off for these (x-compose) sequences by default?
-
-;;; (Aidan Kehoe, 2005-05-18)
-
-(define-key compose-acute-map [space] "'")
-(define-key compose-acute-map [?'] [(?\264)])
-(define-key compose-acute-map [?A] [(?\301)])
-(define-key compose-acute-map [E] [(?\311)])
-(define-key compose-acute-map [I] [(?\315)])
-(define-key compose-acute-map [O] [(?\323)])
-(define-key compose-acute-map [U] [(?\332)])
-(define-key compose-acute-map [Y] [(?\335)])
-(define-key compose-acute-map [a] [(?\341)])
-(define-key compose-acute-map [e] [(?\351)])
-(define-key compose-acute-map [i] [(?\355)])
-(define-key compose-acute-map [o] [(?\363)])
-(define-key compose-acute-map [u] [(?\372)])
-(define-key compose-acute-map [y] [(?\375)])
-
-(define-key compose-grave-map [space] "`")
-(define-key compose-grave-map [?`] [(?\140)])
-(define-key compose-grave-map [A] [(?\300)])
-(define-key compose-grave-map [E] [(?\310)])
-(define-key compose-grave-map [I] [(?\314)])
-(define-key compose-grave-map [O] [(?\322)])
-(define-key compose-grave-map [U] [(?\331)])
-(define-key compose-grave-map [a] [(?\340)])
-(define-key compose-grave-map [e] [(?\350)])
-(define-key compose-grave-map [i] [(?\354)])
-(define-key compose-grave-map [o] [(?\362)])
-(define-key compose-grave-map [u] [(?\371)])
-
-(define-key compose-cedilla-map [space] ",")
-(define-key compose-cedilla-map [?,] [(?\270)])
-(define-key compose-cedilla-map [C] [(?\307)])
-(define-key compose-cedilla-map [c] [(?\347)])
-
-(define-key compose-diaeresis-map [space] [(?\250)])
-(define-key compose-diaeresis-map [?\"] [(?\250)])
-(define-key compose-diaeresis-map [A] [(?\304)])
-(define-key compose-diaeresis-map [E] [(?\313)])
-(define-key compose-diaeresis-map [I] [(?\317)])
-(define-key compose-diaeresis-map [O] [(?\326)])
-(define-key compose-diaeresis-map [U] [(?\334)])
-(define-key compose-diaeresis-map [a] [(?\344)])
-(define-key compose-diaeresis-map [e] [(?\353)])
-(define-key compose-diaeresis-map [i] [(?\357)])
-(define-key compose-diaeresis-map [o] [(?\366)])
-;; Not strictly a diaeresis, but close enough for government work.
-(define-key compose-diaeresis-map [s] [(?\337)])
-(define-key compose-diaeresis-map [u] [(?\374)])
-(define-key compose-diaeresis-map [y] [(?\377)])
-
-(define-key compose-circumflex-map [space] "^")
-(define-key compose-circumflex-map [?/] "|")
-(define-key compose-circumflex-map [?!] [(?\246)])
-(define-key compose-circumflex-map [?-] [(?\257)])
-(define-key compose-circumflex-map [?_] [(?\257)])
-(define-key compose-circumflex-map [?0] [(?\260)])
-(define-key compose-circumflex-map [?1] [(?\271)])
-(define-key compose-circumflex-map [?2] [(?\262)])
-(define-key compose-circumflex-map [?3] [(?\263)])
-(define-key compose-circumflex-map [?.] [(?\267)])
-(define-key compose-circumflex-map [A] [(?\302)])
-(define-key compose-circumflex-map [E] [(?\312)])
-(define-key compose-circumflex-map [I] [(?\316)])
-(define-key compose-circumflex-map [O] [(?\324)])
-(define-key compose-circumflex-map [U] [(?\333)])
-(define-key compose-circumflex-map [a] [(?\342)])
-(define-key compose-circumflex-map [e] [(?\352)])
-(define-key compose-circumflex-map [i] [(?\356)])
-(define-key compose-circumflex-map [o] [(?\364)])
-(define-key compose-circumflex-map [u] [(?\373)])
-
-(define-key compose-tilde-map [space] "~")
-(define-key compose-tilde-map [A] [(?\303)])
-(define-key compose-tilde-map [N] [(?\321)])
-(define-key compose-tilde-map [O] [(?\325)])
-(define-key compose-tilde-map [a] [(?\343)])
-(define-key compose-tilde-map [n] [(?\361)])
-(define-key compose-tilde-map [o] [(?\365)])
-
-(define-key compose-ring-map [space] [(?\260)])
-(define-key compose-ring-map [A] [(?\305)])
-(define-key compose-ring-map [a] [(?\345)])
+;;; Against the spirit of Unicode, which says that the precomposed
+;;; characters are just there for round-trip compatibility with other
+;;; encodings and don't reflect that they're necessarily used much, these
+;;; are just the precomposed Latin characters in UnicodeData.txt; we don't
+;;; support any decomposed characters here. (Not least because in general we
+;;; don't have worthwhile support for precomposed characters.)
+
+(assert
+ (or (featurep 'mule) (null (decode-char 'ucs #x100)))
+ nil
+ "This code assumes no non-Mule characters have a UCS value \
+greater than #xFF, and needs to be rewritten if that is not true.")
+
+(macrolet
+ ((decide-on-bindings (&rest details)
+ "Look through DETAILS, working out which bindings work on non-Mule.
+
+This returns a long `if' statement that should be executed when this file is
+loaded; it assumes that #xFF is the inclusive upper bound for the Unicode
+value of characters under non-Mule. "
+ (loop for (map key binding) in details
+ with if-mule = nil
+ with without-mule = nil
+ do
+ (push `(define-key ,map ,key
+ (vector (list (decode-char 'ucs ,binding)))) if-mule)
+ (when (<= binding #xFF)
+ (push `(define-key ,map ,key
+ (vector (list (decode-char 'ucs ,binding))))
+ without-mule))
+ finally return `(if (featurep 'mule)
+ (progn ,@if-mule)
+ ,@without-mule))))
+ (decide-on-bindings
+ (compose-acute-map [space] #x0027) ;; APOSTROPHE
+ (compose-acute-map [?\'] #x00B4) ;; ACUTE ACCENT
+ (compose-acute-map [?A] #x00C1) ;; CAPITAL A WITH ACUTE
+ (compose-acute-map [?C] #x0106) ;; CAPITAL C WITH ACUTE
+ (compose-acute-map [?E] #x00C9) ;; CAPITAL E WITH ACUTE
+ (compose-acute-map [?G] #x01F4) ;; CAPITAL G WITH ACUTE
+ (compose-acute-map [?I] #x00CD) ;; CAPITAL I WITH ACUTE
+ (compose-acute-map [?K] #x1E30) ;; CAPITAL K WITH ACUTE
+ (compose-acute-map [?L] #x0139) ;; CAPITAL L WITH ACUTE
+ (compose-acute-map [?M] #x1E3E) ;; CAPITAL M WITH ACUTE
+ (compose-acute-map [?N] #x0143) ;; CAPITAL N WITH ACUTE
+ (compose-acute-map [?O] #x00D3) ;; CAPITAL O WITH ACUTE
+ (compose-acute-map [?P] #x1E54) ;; CAPITAL P WITH ACUTE
+ (compose-acute-map [?R] #x0154) ;; CAPITAL R WITH ACUTE
+ (compose-acute-map [?S] #x015A) ;; CAPITAL S WITH ACUTE
+ (compose-acute-map [?U] #x00DA) ;; CAPITAL U WITH ACUTE
+ (compose-acute-map [?W] #x1E82) ;; CAPITAL W WITH ACUTE
+ (compose-acute-map [?Y] #x00DD) ;; CAPITAL Y WITH ACUTE
+ (compose-acute-map [?Z] #x0179) ;; CAPITAL Z WITH ACUTE
+ (compose-acute-map [?a] #x00E1) ;; SMALL A WITH ACUTE
+ (compose-acute-map [?c] #x0107) ;; SMALL C WITH ACUTE
+ (compose-acute-map [?e] #x00E9) ;; SMALL E WITH ACUTE
+ (compose-acute-map [?g] #x01F5) ;; SMALL G WITH ACUTE
+ (compose-acute-map [?i] #x00ED) ;; SMALL I WITH ACUTE
+ (compose-acute-map [?k] #x1E31) ;; SMALL K WITH ACUTE
+ (compose-acute-map [?l] #x013A) ;; SMALL L WITH ACUTE
+ (compose-acute-map [?m] #x1E3F) ;; SMALL M WITH ACUTE
+ (compose-acute-map [?n] #x0144) ;; SMALL N WITH ACUTE
+ (compose-acute-map [?o] #x00F3) ;; SMALL O WITH ACUTE
+ (compose-acute-map [?p] #x1E55) ;; SMALL P WITH ACUTE
+ (compose-acute-map [?r] #x0155) ;; SMALL R WITH ACUTE
+ (compose-acute-map [?s] #x015B) ;; SMALL S WITH ACUTE
+ (compose-acute-map [?u] #x00FA) ;; SMALL U WITH ACUTE
+ (compose-acute-map [?w] #x1E83) ;; SMALL W WITH ACUTE
+ (compose-acute-map [?y] #x00FD) ;; SMALL Y WITH ACUTE
+ (compose-acute-map [?z] #x017A) ;; SMALL Z WITH ACUTE
+ (compose-grave-map [space] #x0060) ;; GRAVE ACCENT
+ (compose-grave-map [?\`] #x0060) ;; GRAVE ACCENT
+ (compose-grave-map [?A] #x00C0) ;; CAPITAL A WITH GRAVE
+ (compose-grave-map [?E] #x00C8) ;; CAPITAL E WITH GRAVE
+ (compose-grave-map [?I] #x00CC) ;; CAPITAL I WITH GRAVE
+ (compose-grave-map [?N] #x01F8) ;; CAPITAL N WITH GRAVE
+ (compose-grave-map [?O] #x00D2) ;; CAPITAL O WITH GRAVE
+ (compose-grave-map [?U] #x00D9) ;; CAPITAL U WITH GRAVE
+ (compose-grave-map [?W] #x1E80) ;; CAPITAL W WITH GRAVE
+ (compose-grave-map [?Y] #x1EF2) ;; CAPITAL Y WITH GRAVE
+ (compose-grave-map [?a] #x00E0) ;; SMALL A WITH GRAVE
+ (compose-grave-map [?e] #x00E8) ;; SMALL E WITH GRAVE
+ (compose-grave-map [?i] #x00EC) ;; SMALL I WITH GRAVE
+ (compose-grave-map [?n] #x01F9) ;; SMALL N WITH GRAVE
+ (compose-grave-map [?o] #x00F2) ;; SMALL O WITH GRAVE
+ (compose-grave-map [?u] #x00F9) ;; SMALL U WITH GRAVE
+ (compose-grave-map [?w] #x1E81) ;; SMALL W WITH GRAVE
+ (compose-grave-map [?y] #x1EF3) ;; SMALL Y WITH GRAVE
+ (compose-cedilla-map [space] #x002C) ;; COMMA
+ (compose-cedilla-map [?\,] #x00B8) ;; CEDILLA
+ (compose-cedilla-map [C] #x00C7) ;; CAPITAL C WITH CEDILLA
+ (compose-cedilla-map [D] #x1E10) ;; CAPITAL D WITH CEDILLA
+ (compose-cedilla-map [E] #x0228) ;; CAPITAL E WITH CEDILLA
+ (compose-cedilla-map [G] #x0122) ;; CAPITAL G WITH CEDILLA
+ (compose-cedilla-map [H] #x1E28) ;; CAPITAL H WITH CEDILLA
+ (compose-cedilla-map [K] #x0136) ;; CAPITAL K WITH CEDILLA
+ (compose-cedilla-map [L] #x013B) ;; CAPITAL L WITH CEDILLA
+ (compose-cedilla-map [N] #x0145) ;; CAPITAL N WITH CEDILLA
+ (compose-cedilla-map [R] #x0156) ;; CAPITAL R WITH CEDILLA
+ (compose-cedilla-map [S] #x015E) ;; CAPITAL S WITH CEDILLA
+ (compose-cedilla-map [T] #x0162) ;; CAPITAL T WITH CEDILLA
+ (compose-cedilla-map [c] #x00E7) ;; SMALL C WITH CEDILLA
+ (compose-cedilla-map [d] #x1E11) ;; SMALL D WITH CEDILLA
+ (compose-cedilla-map [e] #x0229) ;; SMALL E WITH CEDILLA
+ (compose-cedilla-map [g] #x0123) ;; SMALL G WITH CEDILLA
+ (compose-cedilla-map [h] #x1E29) ;; SMALL H WITH CEDILLA
+ (compose-cedilla-map [k] #x0137) ;; SMALL K WITH CEDILLA
+ (compose-cedilla-map [l] #x013C) ;; SMALL L WITH CEDILLA
+ (compose-cedilla-map [n] #x0146) ;; SMALL N WITH CEDILLA
+ (compose-cedilla-map [r] #x0157) ;; SMALL R WITH CEDILLA
+ (compose-cedilla-map [s] #x015F) ;; SMALL S WITH CEDILLA
+ (compose-cedilla-map [t] #x0163) ;; SMALL T WITH CEDILLA
+ (compose-diaeresis-map [space] #x00A8) ;; DIAERESIS
+ (compose-diaeresis-map [?\"] #x00A8) ;; DIAERESIS
+ (compose-diaeresis-map [?s] #x00DF) ;; SMALL SHARP S
+ (compose-diaeresis-map [?A] #x00C4) ;; CAPITAL A WITH DIAERESIS
+ (compose-diaeresis-map [?E] #x00CB) ;; CAPITAL E WITH DIAERESIS
+ (compose-diaeresis-map [?H] #x1E26) ;; CAPITAL H WITH DIAERESIS
+ (compose-diaeresis-map [?I] #x00CF) ;; CAPITAL I WITH DIAERESIS
+ (compose-diaeresis-map [?O] #x00D6) ;; CAPITAL O WITH DIAERESIS
+ (compose-diaeresis-map [?U] #x00DC) ;; CAPITAL U WITH DIAERESIS
+ (compose-diaeresis-map [?W] #x1E84) ;; CAPITAL W WITH DIAERESIS
+ (compose-diaeresis-map [?X] #x1E8C) ;; CAPITAL X WITH DIAERESIS
+ (compose-diaeresis-map [?Y] #x0178) ;; CAPITAL Y WITH DIAERESIS
+ (compose-diaeresis-map [?a] #x00E4) ;; SMALL A WITH DIAERESIS
+ (compose-diaeresis-map [?e] #x00EB) ;; SMALL E WITH DIAERESIS
+ (compose-diaeresis-map [?h] #x1E27) ;; SMALL H WITH DIAERESIS
+ (compose-diaeresis-map [?i] #x00EF) ;; SMALL I WITH DIAERESIS
+ (compose-diaeresis-map [?o] #x00F6) ;; SMALL O WITH DIAERESIS
+ (compose-diaeresis-map [?t] #x1E97) ;; SMALL T WITH DIAERESIS
+ (compose-diaeresis-map [?u] #x00FC) ;; SMALL U WITH DIAERESIS
+ (compose-diaeresis-map [?w] #x1E85) ;; SMALL W WITH DIAERESIS
+ (compose-diaeresis-map [?x] #x1E8D) ;; SMALL X WITH DIAERESIS
+ (compose-diaeresis-map [?y] #x00FF) ;; SMALL Y WITH DIAERESIS
+ (compose-circumflex-map [space] #x005e) ;; CIRCUMFLEX ACCENT
+ (compose-circumflex-map [?A] #x00C2) ;; CAPITAL A WITH CIRCUMFLEX
+ (compose-circumflex-map [?C] #x0108) ;; CAPITAL C WITH CIRCUMFLEX
+ (compose-circumflex-map [?E] #x00CA) ;; CAPITAL E WITH CIRCUMFLEX
+ (compose-circumflex-map [?G] #x011C) ;; CAPITAL G WITH CIRCUMFLEX
+ (compose-circumflex-map [?H] #x0124) ;; CAPITAL H WITH CIRCUMFLEX
+ (compose-circumflex-map [?I] #x00CE) ;; CAPITAL I WITH CIRCUMFLEX
+ (compose-circumflex-map [?J] #x0134) ;; CAPITAL J WITH CIRCUMFLEX
+ (compose-circumflex-map [?O] #x00D4) ;; CAPITAL O WITH CIRCUMFLEX
+ (compose-circumflex-map [?S] #x015C) ;; CAPITAL S WITH CIRCUMFLEX
+ (compose-circumflex-map [?U] #x00DB) ;; CAPITAL U WITH CIRCUMFLEX
+ (compose-circumflex-map [?W] #x0174) ;; CAPITAL W WITH CIRCUMFLEX
+ (compose-circumflex-map [?Y] #x0176) ;; CAPITAL Y WITH CIRCUMFLEX
+ (compose-circumflex-map [?Z] #x1E90) ;; CAPITAL Z WITH CIRCUMFLEX
+ (compose-circumflex-map [?a] #x00e2) ;; SMALL A WITH CIRCUMFLEX
+ (compose-circumflex-map [?c] #x0109) ;; SMALL C WITH CIRCUMFLEX
+ (compose-circumflex-map [?e] #x00ea) ;; SMALL E WITH CIRCUMFLEX
+ (compose-circumflex-map [?g] #x011d) ;; SMALL G WITH CIRCUMFLEX
+ (compose-circumflex-map [?h] #x0125) ;; SMALL H WITH CIRCUMFLEX
+ (compose-circumflex-map [?i] #x00ee) ;; SMALL I WITH CIRCUMFLEX
+ (compose-circumflex-map [?j] #x0135) ;; SMALL J WITH CIRCUMFLEX
+ (compose-circumflex-map [?o] #x00f4) ;; SMALL O WITH CIRCUMFLEX
+ (compose-circumflex-map [?s] #x015d) ;; SMALL S WITH CIRCUMFLEX
+ (compose-circumflex-map [?u] #x00fb) ;; SMALL U WITH CIRCUMFLEX
+ (compose-circumflex-map [?w] #x0175) ;; SMALL W WITH CIRCUMFLEX
+ (compose-circumflex-map [?y] #x0177) ;; SMALL Y WITH CIRCUMFLEX
+ (compose-circumflex-map [?z] #x1e91) ;; SMALL Z WITH CIRCUMFLEX
+ (compose-tilde-map [space] #x007E) ;; TILDE
+ (compose-tilde-map [?A] #x00C3) ;; CAPITAL A WITH TILDE
+ (compose-tilde-map [?E] #x1EBC) ;; CAPITAL E WITH TILDE
+ (compose-tilde-map [?I] #x0128) ;; CAPITAL I WITH TILDE
+ (compose-tilde-map [?N] #x00D1) ;; CAPITAL N WITH TILDE
+ (compose-tilde-map [?O] #x00D5) ;; CAPITAL O WITH TILDE
+ (compose-tilde-map [?U] #x0168) ;; CAPITAL U WITH TILDE
+ (compose-tilde-map [?V] #x1E7C) ;; CAPITAL V WITH TILDE
+ (compose-tilde-map [?Y] #x1EF8) ;; CAPITAL Y WITH TILDE
+ (compose-tilde-map [?a] #x00E3) ;; SMALL A WITH TILDE
+ (compose-tilde-map [?e] #x1EBD) ;; SMALL E WITH TILDE
+ (compose-tilde-map [?i] #x0129) ;; SMALL I WITH TILDE
+ (compose-tilde-map [?n] #x00F1) ;; SMALL N WITH TILDE
+ (compose-tilde-map [?o] #x00F5) ;; SMALL O WITH TILDE
+ (compose-tilde-map [?u] #x0169) ;; SMALL U WITH TILDE
+ (compose-tilde-map [?v] #x1E7D) ;; SMALL V WITH TILDE
+ (compose-tilde-map [?y] #x1EF9) ;; SMALL Y WITH TILDE
+ (compose-ring-map [space] #x00B0) ;; DEGREE SIGN
+ (compose-ring-map [?A] #x00C5) ;; CAPITAL A WITH RING ABOVE
+ (compose-ring-map [?U] #x016E) ;; CAPITAL U WITH RING ABOVE
+ (compose-ring-map [?a] #x00E5) ;; SMALL A WITH RING ABOVE
+ (compose-ring-map [?u] #x016F) ;; SMALL U WITH RING ABOVE
+ (compose-ring-map [?w] #x1E98) ;; SMALL W WITH RING ABOVE
+ (compose-ring-map [?y] #x1E99) ;; SMALL Y WITH RING ABOVE
+ (compose-caron-map [space] #x02C7) ;; CARON
+ (compose-caron-map [?A] #x01CD) ;; CAPITAL A WITH CARON
+ (compose-caron-map [?C] #x010C) ;; CAPITAL C WITH CARON
+ (compose-caron-map [?D] #x010E) ;; CAPITAL D WITH CARON
+ (compose-caron-map [U01F1] #x01C4) ;; CAPITAL DZ WITH CARON
+ (compose-caron-map [?E] #x011A) ;; CAPITAL E WITH CARON
+ (compose-caron-map [U01B7] #x01EE) ;; CAPITAL EZH WITH CARON
+ (compose-caron-map [?G] #x01E6) ;; CAPITAL G WITH CARON
+ (compose-caron-map [?H] #x021E) ;; CAPITAL H WITH CARON
+ (compose-caron-map [?I] #x01CF) ;; CAPITAL I WITH CARON
+ (compose-caron-map [?K] #x01E8) ;; CAPITAL K WITH CARON
+ (compose-caron-map [?L] #x013D) ;; CAPITAL L WITH CARON
+ (compose-caron-map [?N] #x0147) ;; CAPITAL N WITH CARON
+ (compose-caron-map [?O] #x01D1) ;; CAPITAL O WITH CARON
+ (compose-caron-map [?R] #x0158) ;; CAPITAL R WITH CARON
+ (compose-caron-map [?S] #x0160) ;; CAPITAL S WITH CARON
+ (compose-caron-map [?T] #x0164) ;; CAPITAL T WITH CARON
+ (compose-caron-map [?U] #x01D3) ;; CAPITAL U WITH CARON
+ (compose-caron-map [?Z] #x017D) ;; CAPITAL Z WITH CARON
+ (compose-caron-map [?a] #x01CE) ;; SMALL A WITH CARON
+ (compose-caron-map [?c] #x010D) ;; SMALL C WITH CARON
+ (compose-caron-map [?d] #x010F) ;; SMALL D WITH CARON
+ (compose-caron-map [U01F3] #x01C6) ;; SMALL DZ WITH CARON
+ (compose-caron-map [?e] #x011B) ;; SMALL E WITH CARON
+ (compose-caron-map [U0292] #x01EF) ;; SMALL EZH WITH CARON
+ (compose-caron-map [?g] #x01E7) ;; SMALL G WITH CARON
+ (compose-caron-map [?h] #x021F) ;; SMALL H WITH CARON
+ (compose-caron-map [?i] #x01D0) ;; SMALL I WITH CARON
+ (compose-caron-map [?j] #x01F0) ;; SMALL J WITH CARON
+ (compose-caron-map [?k] #x01E9) ;; SMALL K WITH CARON
+ (compose-caron-map [?l] #x013E) ;; SMALL L WITH CARON
+ (compose-caron-map [?n] #x0148) ;; SMALL N WITH CARON
+ (compose-caron-map [?o] #x01D2) ;; SMALL O WITH CARON
+ (compose-caron-map [?r] #x0159) ;; SMALL R WITH CARON
+ (compose-caron-map [?s] #x0161) ;; SMALL S WITH CARON
+ (compose-caron-map [?t] #x0165) ;; SMALL T WITH CARON
+ (compose-caron-map [?u] #x01D4) ;; SMALL U WITH CARON
+ (compose-caron-map [?z] #x017E) ;; SMALL Z WITH CARON
+ (compose-macron-map [space] #x00AF) ;; MACRON
+ (compose-macron-map [?A] #x0100) ;; CAPITAL A WITH MACRON
+ (compose-macron-map [AE] #x01E2) ;; CAPITAL AE WITH MACRON
+ (compose-macron-map [?E] #x0112) ;; CAPITAL E WITH MACRON
+ (compose-macron-map [?G] #x1E20) ;; CAPITAL G WITH MACRON
+ (compose-macron-map [?I] #x012A) ;; CAPITAL I WITH MACRON
+ (compose-macron-map [?O] #x014C) ;; CAPITAL O WITH MACRON
+ (compose-macron-map [?U] #x016A) ;; CAPITAL U WITH MACRON
+ (compose-macron-map [?Y] #x0232) ;; CAPITAL Y WITH MACRON
+ (compose-macron-map [?a] #x0101) ;; SMALL A WITH MACRON
+ (compose-macron-map [ae] #x01E3) ;; SMALL AE WITH MACRON
+ (compose-macron-map [?e] #x0113) ;; SMALL E WITH MACRON
+ (compose-macron-map [?g] #x1E21) ;; SMALL G WITH MACRON
+ (compose-macron-map [?i] #x012B) ;; SMALL I WITH MACRON
+ (compose-macron-map [?o] #x014D) ;; SMALL O WITH MACRON
+ (compose-macron-map [?u] #x016B) ;; SMALL U WITH MACRON
+ (compose-macron-map [?y] #x0233) ;; SMALL Y WITH MACRON
+ (compose-doubleacute-map [space] #x02DD) ;; DOUBLE ACUTE ACCENT
+ (compose-doubleacute-map [?O] #x0150) ;; CAPITAL O WITH DOUBLE ACUTE
+ (compose-doubleacute-map [?U] #x0170) ;; CAPITAL U WITH DOUBLE ACUTE
+ (compose-doubleacute-map [?o] #x0151) ;; SMALL O WITH DOUBLE ACUTE
+ (compose-doubleacute-map [?u] #x0171) ;; SMALL U WITH DOUBLE ACUTE
+ (compose-ogonek-map [space] #x02DB) ;; OGONEK
+ (compose-ogonek-map [?A] #x0104) ;; CAPITAL A WITH OGONEK
+ (compose-ogonek-map [?E] #x0118) ;; CAPITAL E WITH OGONEK
+ (compose-ogonek-map [?I] #x012E) ;; CAPITAL I WITH OGONEK
+ (compose-ogonek-map [?O] #x01EA) ;; CAPITAL O WITH OGONEK
+ (compose-ogonek-map [?U] #x0172) ;; CAPITAL U WITH OGONEK
+ (compose-ogonek-map [?a] #x0105) ;; SMALL A WITH OGONEK
+ (compose-ogonek-map [?e] #x0119) ;; SMALL E WITH OGONEK
+ (compose-ogonek-map [?i] #x012F) ;; SMALL I WITH OGONEK
+ (compose-ogonek-map [?o] #x01EB) ;; SMALL O WITH OGONEK
+ (compose-ogonek-map [?u] #x0173) ;; SMALL U WITH OGONEK
+ (compose-breve-map [space] #x02D8) ;; BREVE
+ (compose-breve-map [?A] #x0102) ;; CAPITAL A WITH BREVE
+ (compose-breve-map [?E] #x0114) ;; CAPITAL E WITH BREVE
+ (compose-breve-map [?G] #x011E) ;; CAPITAL G WITH BREVE
+ (compose-breve-map [?I] #x012C) ;; CAPITAL I WITH BREVE
+ (compose-breve-map [?O] #x014E) ;; CAPITAL O WITH BREVE
+ (compose-breve-map [?U] #x016C) ;; CAPITAL U WITH BREVE
+ (compose-breve-map [?a] #x0103) ;; SMALL A WITH BREVE
+ (compose-breve-map [?e] #x0115) ;; SMALL E WITH BREVE
+ (compose-breve-map [?g] #x011F) ;; SMALL G WITH BREVE
+ (compose-breve-map [?i] #x012D) ;; SMALL I WITH BREVE
+ (compose-breve-map [?o] #x014F) ;; SMALL O WITH BREVE
+ (compose-breve-map [?u] #x016D) ;; SMALL U WITH BREVE
+ (compose-dot-map [space] #x02D9) ;; DOT ABOVE
+ (compose-dot-map [?A] #x0226) ;; CAPITAL A WITH DOT ABOVE
+ (compose-dot-map [?B] #x1E02) ;; CAPITAL B WITH DOT ABOVE
+ (compose-dot-map [?C] #x010A) ;; CAPITAL C WITH DOT ABOVE
+ (compose-dot-map [?D] #x1E0A) ;; CAPITAL D WITH DOT ABOVE
+ (compose-dot-map [?E] #x0116) ;; CAPITAL E WITH DOT ABOVE
+ (compose-dot-map [?F] #x1E1E) ;; CAPITAL F WITH DOT ABOVE
+ (compose-dot-map [?G] #x0120) ;; CAPITAL G WITH DOT ABOVE
+ (compose-dot-map [?H] #x1E22) ;; CAPITAL H WITH DOT ABOVE
+ (compose-dot-map [?I] #x0130) ;; CAPITAL I WITH DOT ABOVE
+ (compose-dot-map [?M] #x1E40) ;; CAPITAL M WITH DOT ABOVE
+ (compose-dot-map [?N] #x1E44) ;; CAPITAL N WITH DOT ABOVE
+ (compose-dot-map [?O] #x022E) ;; CAPITAL O WITH DOT ABOVE
+ (compose-dot-map [?P] #x1E56) ;; CAPITAL P WITH DOT ABOVE
+ (compose-dot-map [?R] #x1E58) ;; CAPITAL R WITH DOT ABOVE
+ (compose-dot-map [?S] #x1E60) ;; CAPITAL S WITH DOT ABOVE
+ (compose-dot-map [?T] #x1E6A) ;; CAPITAL T WITH DOT ABOVE
+ (compose-dot-map [?W] #x1E86) ;; CAPITAL W WITH DOT ABOVE
+ (compose-dot-map [?X] #x1E8A) ;; CAPITAL X WITH DOT ABOVE
+ (compose-dot-map [?Y] #x1E8E) ;; CAPITAL Y WITH DOT ABOVE
+ (compose-dot-map [?Z] #x017B) ;; CAPITAL Z WITH DOT ABOVE
+ (compose-dot-map [?a] #x0227) ;; SMALL A WITH DOT ABOVE
+ (compose-dot-map [?b] #x1E03) ;; SMALL B WITH DOT ABOVE
+ (compose-dot-map [?c] #x010B) ;; SMALL C WITH DOT ABOVE
+ (compose-dot-map [?d] #x1E0B) ;; SMALL D WITH DOT ABOVE
+ (compose-dot-map [?e] #x0117) ;; SMALL E WITH DOT ABOVE
+ (compose-dot-map [?f] #x1E1F) ;; SMALL F WITH DOT ABOVE
+ (compose-dot-map [?g] #x0121) ;; SMALL G WITH DOT ABOVE
+ (compose-dot-map [?h] #x1E23) ;; SMALL H WITH DOT ABOVE
+ (compose-dot-map [U017F] #x1E9B) ;; SMALL LONG S WITH DOT ABOVE
+ (compose-dot-map [?m] #x1E41) ;; SMALL M WITH DOT ABOVE
+ (compose-dot-map [?n] #x1E45) ;; SMALL N WITH DOT ABOVE
+ (compose-dot-map [?o] #x022F) ;; SMALL O WITH DOT ABOVE
+ (compose-dot-map [?p] #x1E57) ;; SMALL P WITH DOT ABOVE
+ (compose-dot-map [?r] #x1E59) ;; SMALL R WITH DOT ABOVE
+ (compose-dot-map [?s] #x1E61) ;; SMALL S WITH DOT ABOVE
+ (compose-dot-map [?t] #x1E6B) ;; SMALL T WITH DOT ABOVE
+ (compose-dot-map [?w] #x1E87) ;; SMALL W WITH DOT ABOVE
+ (compose-dot-map [?x] #x1E8B) ;; SMALL X WITH DOT ABOVE
+ (compose-dot-map [?y] #x1E8F) ;; SMALL Y WITH DOT ABOVE
+ (compose-dot-map [?z] #x017C) ;; SMALL Z WITH DOT ABOVE
+ (compose-dot-map [?i] #x0131) ;; SMALL DOTLESS I
+ (compose-dot-map [?j] #x0237) ;; SMALL DOTLESS J
+ ;; There is nothing obvious we can bind space to on compose-hook-map,
+ ;; these are IPA characters that are in Unicode theory not
+ ;; precomposed.
+ (compose-hook-map [?B] #x0181) ;; CAPITAL B WITH HOOK
+ (compose-hook-map [?C] #x0187) ;; CAPITAL C WITH HOOK
+ (compose-hook-map [?D] #x018A) ;; CAPITAL D WITH HOOK
+ (compose-hook-map [?F] #x0191) ;; CAPITAL F WITH HOOK
+ (compose-hook-map [?G] #x0193) ;; CAPITAL G WITH HOOK
+ (compose-hook-map [?K] #x0198) ;; CAPITAL K WITH HOOK
+ (compose-hook-map [?P] #x01A4) ;; CAPITAL P WITH HOOK
+ (compose-hook-map [?T] #x01AC) ;; CAPITAL T WITH HOOK
+ (compose-hook-map [?V] #x01B2) ;; CAPITAL V WITH HOOK
+ (compose-hook-map [?Y] #x01B3) ;; CAPITAL Y WITH HOOK
+ (compose-hook-map [?Z] #x0224) ;; CAPITAL Z WITH HOOK
+ (compose-hook-map [U0262] #x029B) ;; SMALL CAPITAL G WITH HOOK
+ (compose-hook-map [?b] #x0253) ;; SMALL B WITH HOOK
+ (compose-hook-map [?c] #x0188) ;; SMALL C WITH HOOK
+ (compose-hook-map [?d] #x0257) ;; SMALL D WITH HOOK
+ (compose-hook-map [?f] #x0192) ;; SMALL F WITH HOOK
+ (compose-hook-map [?g] #x0260) ;; SMALL G WITH HOOK
+ (compose-hook-map [?h] #x0266) ;; SMALL H WITH HOOK
+ (compose-hook-map [U0266] #x0267) ;; SMALL HENG WITH HOOK
+ (compose-hook-map [?k] #x0199) ;; SMALL K WITH HOOK
+ (compose-hook-map [?m] #x0271) ;; SMALL M WITH HOOK
+ (compose-hook-map [?p] #x01A5) ;; SMALL P WITH HOOK
+ (compose-hook-map [?q] #x02A0) ;; SMALL Q WITH HOOK
+ (compose-hook-map [U025C] #x025D) ;; SMALL REVERSED OPEN E WITH HOOK
+ (compose-hook-map [?s] #x0282) ;; SMALL S WITH HOOK
+ (compose-hook-map [U0259] #x025A) ;; SMALL SCHWA WITH HOOK
+ (compose-hook-map [?t] #x01AD) ;; SMALL T WITH HOOK
+ (compose-hook-map [U0279] #x027B) ;; SMALL TURNED R WITH HOOK
+ (compose-hook-map [?v] #x028B) ;; SMALL V WITH HOOK
+ (compose-hook-map [?y] #x01B4) ;; SMALL Y WITH HOOK
+ (compose-hook-map [?z] #x0225) ;; SMALL Z WITH HOOK
+ (compose-horn-map [space] #x031b)
+ (compose-horn-map [?O] #x01A0) ;; CAPITAL O WITH HORN
+ (compose-horn-map [?U] #x01AF) ;; CAPITAL U WITH HORN
+ (compose-horn-map [?o] #x01A1) ;; SMALL O WITH HORN
+ (compose-horn-map [?u] #x01B0))) ;; SMALL U WITH HORN
;;; The rest of the compose-map. These are the composed characters
@@ -532,53 +828,17 @@
(define-key compose-map "||" [(?\246)])
-;; [[ Suppose we type these three physical keys: [Multi_key " a]
-;; Xlib can deliver these keys as the following sequences of keysyms:
-;;
-;; - [Multi_key " a] (no surprise here)
-;; - [adiaeresis] (OK, Xlib is doing compose processing for us)
-;; - [Multi_key " adiaeresis] (Huh?)
-;;
-;; It is the last possibility that is arguably a bug. Xlib can't
-;; decide whether it's really doing compose processing or not (or
-;; actually, different parts of Xlib disagree).
-;;
-;; So we'll just convert [Multi_key " adiaeresis] to [adiaeresis] ]]
-
-(eval-when-compile
- (when nil ;; Commenting out.
-
- ;; This _used_ to work with our X11-oriented keysyms above. With them
- ;; gone, it won't. The X11 bug it works around should be long dead. (Ha!
- ;; Wasn't it cockroaches that would have ruled the planet after World
- ;; War III?)
-
- (defun xlib-input-method-bug-workaround (keymap)
- (map-keymap
- (lambda (key value)
- (cond
- ((keymapp value)
- (xlib-input-method-bug-workaround value))
- ((and (sequencep value)
- (eq 1 (length value))
- (null (lookup-key keymap value)))
- (define-key keymap value value))))
- keymap))
- (xlib-input-method-bug-workaround compose-map)
- (unintern 'xlib-input-method-bug-workaround)))
-
-;; While we're at it, a similar mechanism will make colon equivalent
-;; to doublequote for diaeresis processing. Some Xlibs do this.
-(defun alias-colon-to-doublequote (keymap)
- (map-keymap
- (lambda (key value)
- (when (keymapp value)
- (alias-colon-to-doublequote value))
- (when (eq key '\")
- (define-key keymap ":" value)))
- keymap))
-(alias-colon-to-doublequote compose-map)
-(unintern 'alias-colon-to-doublequote)
+;; Make colon equivalent to doublequote for diaeresis processing. Some
+;; Xlibs do this.
+(flet ((alias-colon-to-doublequote (keymap)
+ (map-keymap
+ #'(lambda (key value)
+ (when (keymapp value)
+ (alias-colon-to-doublequote value))
+ (when (eq key '\")
+ (define-key keymap ":" value)))
+ keymap)))
+ (alias-colon-to-doublequote compose-map))
;;; Electric dead keys: making a' mean a-acute.
@@ -587,7 +847,7 @@
"Modify the previous character with an accent.
For example, if `:' is bound to this command, then typing `a:'
will first insert `a' and then turn it into `\344' (adiaeresis).
-The keys to which this command may be bound (and the accents
+The minimum list of keys to which this command may be bound (and the accents
which it understands) are:
' (acute) \301\311\315\323\332\335 \341\351\355\363\372\375
@@ -621,10 +881,13 @@ which it understands) are:
(mod-char (and (>= (downcase base-char) ?a) ; only do alphabetics?
(<= (downcase base-char) ?z)
(lookup-key map (make-string 1 base-char)))))
- (if (and (vectorp mod-char) (= (length mod-char) 1))
- (setq mod-char (aref mod-char 0)))
+ (when (and (vectorp mod-char) (= (length mod-char) 1))
+ (setq mod-char (aref mod-char 0))
+ (if (and (consp mod-char) (= (length mod-char) 1)
+ (characterp (car mod-char)))
+ (setq mod-char (car mod-char))))
(if (and mod-char (symbolp mod-char))
- (setq mod-char (or (get mod-char 'character-of-keysym) mod-char)))
+ (setq mod-char (or (get-character-of-keysym mod-char) mod-char)))
(if (and mod-char (> count 0))
(delete-char -1)
(setq mod-char c))
@@ -658,93 +921,6 @@ which it understands) are:
;; (? "/")) ; no special code
-;;; Providing help in the middle of a compose sequence. (Way cool.)
-
-(eval-when-compile
- (defsubst next-composable-event ()
- (let (event)
- (while (progn
- (setq event (next-command-event))
- (not (or (key-press-event-p event)
- (button-press-event-p event))))
- (dispatch-event event))
- event)))
-
-(defun compose-help (ignore-prompt)
- (let* ((keys (apply 'vector (nbutlast (append (this-command-keys) nil))))
- (map (or (lookup-key function-key-map keys)
- (error "can't find map? %s %s" keys (this-command-keys))))
- binding)
- (save-excursion
- (with-output-to-temp-buffer "*Help*"
- (set-buffer "*Help*")
- (erase-buffer)
- (message "Working...")
- (setq ctl-arrow 'compose) ; non-t-non-nil
- (insert "You are typing a compose sequence. So far you have typed: ")
- (insert (key-description keys))
- (insert "\nCompletions from here are:\n\n")
- (map-keymap 'compose-help-mapper map t)
- (message "? ")))
- (while (keymapp map)
- (setq binding (lookup-key map (vector (next-composable-event))))
- (if (null binding)
- (message "No such key in keymap. Try again.")
- (setq map binding)))
- binding))
-
-(put 'compose-help 'isearch-command t) ; so that it doesn't terminate isearch
-
-(defun compose-help-mapper (key binding)
- (if (and (symbolp key)
- (get key 'character-of-keysym))
- (setq key (get key 'character-of-keysym)))
- (if (eq binding 'compose-help) ; suppress that...
- nil
- (if (keymapp binding)
- (let ((p (point)))
- (map-keymap 'compose-help-mapper binding t)
- (goto-char p)
- (while (not (eobp))
- (if (characterp key)
- (insert (make-string 1 key))
- (insert (single-key-description key)))
- (insert " ")
- (forward-line 1)))
- (if (characterp key)
- (insert (make-string 1 key))
- (insert (single-key-description key)))
- (indent-to 16)
- (let ((code (and (vectorp binding)
- (= 1 (length binding))
- (get (aref binding 0) 'character-of-keysym))))
- (if code
- (insert (make-string 1 code))
- (if (stringp binding)
- (insert binding)
- (insert (prin1-to-string binding)))))
- (when (and (vectorp binding) (= 1 (length binding)))
- (indent-to 32)
- (insert (symbol-name (aref binding 0)))))
- (insert "\n")))
-
-;; define it at top-level in the compose map...
-;;(define-key compose-map [(control h)] 'compose-help)
-;;(define-key compose-map [help] 'compose-help)
-;; and then define it in each sub-map of the compose map.
-(map-keymap
- (lambda (key binding)
- (when (keymapp binding)
-;; (define-key binding [(control h)] 'compose-help)
-;; (define-key binding [help] 'compose-help)
- ))
- compose-map nil)
-
-;; Make redisplay display the accented letters
-(if (memq (default-value 'ctl-arrow) '(t nil))
- (setq-default ctl-arrow 'iso-8859/1))
-
-
(provide 'x-compose)
;;; x-compose.el ends here
diff -r f1bb4cc3144a3a4b1f9431cbaa3adc9938357354 -r fdc76fec36d3ce3b9023a37d4d720db2cf24a1b3 lisp/x-init.el
--- a/lisp/x-init.el Thu Feb 26 18:35:11 2009 +0900
+++ b/lisp/x-init.el Sun Mar 01 11:11:46 2009 +0000
@@ -86,13 +86,14 @@
;; Sun have done to the default keymap for the Sun keyboards.
(defun x-initialize-compose (device)
"Enable compose key and dead key processing on DEVICE."
- (autoload 'compose-map "x-compose" nil t 'keymap)
- (autoload 'compose-acute-map "x-compose" nil t 'keymap)
- (autoload 'compose-grave-map "x-compose" nil t 'keymap)
- (autoload 'compose-cedilla-map "x-compose" nil t 'keymap)
- (autoload 'compose-diaeresis-map "x-compose" nil t 'keymap)
- (autoload 'compose-circumflex-map "x-compose" nil t 'keymap)
- (autoload 'compose-tilde-map "x-compose" nil t 'keymap)
+ (loop for map in '(compose-map compose-acute-map compose-grave-map
+ compose-cedilla-map compose-diaeresis-map
+ compose-circumflex-map compose-tilde-map
+ compose-ring-map compose-caron-map compose-macron-map
+ compose-breve-map compose-dot-map
+ compose-doubleacute-map compose-ogonek-map
+ compose-hook-map compose-horn-map)
+ do (autoload map "x-compose" nil t 'keymap))
(loop
for (key map)
@@ -195,10 +196,19 @@
(dead-acute compose-acute-map)
(dead-grave compose-grave-map)
(dead-cedilla compose-cedilla-map)
- (dead-diaeresis compose-diaeresis-map)
+ (dead-diaeresis compose-diaeresis-map)
(dead-circum compose-circumflex-map)
(dead-circumflex compose-circumflex-map)
- (dead-tilde compose-tilde-map))
+ (dead-tilde compose-tilde-map)
+ (dead-abovering compose-ring-map)
+ (dead-caron compose-caron-map)
+ (dead-macron compose-macron-map)
+ (dead-breve compose-breve-map)
+ (dead-abovedot compose-dot-map)
+ (dead-doubleacute compose-doubleacute-map)
+ (dead-ogonek compose-ogonek-map)
+ (dead-hook compose-hook-map)
+ (dead-horn compose-horn-map))
;; Get the correct value for function-key-map
with function-key-map = (symbol-value-in-console 'function-key-map
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Meta on Mac. <87prh51rni.fsf@xemacs.org>
16 years, 6 months
Aidan Kehoe
changeset: 4666:4527fc976aa383f67a80cfdd760da45e8ce45a14
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Thu Feb 26 18:21:40 2009 +0900
files: man/ChangeLog man/xemacs-faq.texi
description:
Meta on Mac. <87prh51rni.fsf(a)xemacs.org>
diff -r 9dd42cb187edfbef5f82985de4e44ad0af4c020d -r 4527fc976aa383f67a80cfdd760da45e8ce45a14 man/ChangeLog
--- a/man/ChangeLog Wed Feb 04 01:13:10 2009 +0900
+++ b/man/ChangeLog Thu Feb 26 18:21:40 2009 +0900
@@ -1,3 +1,12 @@ 2008-10-04 Stephen J. Turnbull <stephe
+2009-02-26 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * xemacs-faq.texi (Q3.0.12): New node for Meta key on Mac.
+ (Top):
+ (Editing):
+ (Q3.0.11):
+ (Q3.1.1):
+ Fix up Next/Prev/Menu references.
+
2008-10-04 Stephen J. Turnbull <stephen(a)xemacs.org>
* xemacs-faq.texi (Q5.0.7): Fix broken instructions on use of
diff -r 9dd42cb187edfbef5f82985de4e44ad0af4c020d -r 4527fc976aa383f67a80cfdd760da45e8ce45a14 man/xemacs-faq.texi
--- a/man/xemacs-faq.texi Wed Feb 04 01:13:10 2009 +0900
+++ b/man/xemacs-faq.texi Thu Feb 26 18:21:40 2009 +0900
@@ -341,6 +341,7 @@ 3.0: The Keyboard
* Q3.0.9:: HP Alt key as Meta.
* Q3.0.10:: Why does edt emulation not work?
* Q3.0.11:: How can I emulate VI and use it as my default mode?
+* Q3.0.12:: Mac Alt/Option key as Meta.
3.1: The Mouse
* Q3.1.1:: How can I turn off Mouse pasting?
@@ -4607,6 +4608,7 @@ 3.0: The Keyboard
* Q3.0.9:: HP Alt key as Meta.
* Q3.0.10:: Why does edt emulation not work?
* Q3.0.11:: How can I emulate VI and use it as my default mode?
+* Q3.0.12:: Mac Alt/Option key as Meta.
3.1: The Mouse
* Q3.1.1:: How can I turn off Mouse pasting?
@@ -4876,7 +4878,7 @@ add this as well:
(global-set-key [(control h)] 'help-for-help)
@end lisp
-@node Q3.0.11, Q3.1.1, Q3.0.10, Editing
+@node Q3.0.11, Q3.0.12, Q3.0.10, Editing
@unnumberedsubsec Q3.0.11: How can I emulate VI and use it as my default mode?
Our recommended VI emulator is viper. To make viper-mode the default,
@@ -4893,9 +4895,32 @@ it, otherwise some minor modes may not g
it, otherwise some minor modes may not get viper-ized.
@end quotation
+@node Q3.0.12, Q3.1.1, Q3.0.11, Editing
+@unnumberedsubsec Q3.0.12: Mac Alt/Option key as Meta.
+
+Due to the Apple Command key being Meta, I can't use XEmacs on OS X.
+
+Didier Verna suggests:
+
+I use an X version of XEmacs on a Mac every day. You have to tweak the
+keyboard configuration a bit but that's all.
+
+Here's my Xmodmap file on Darwin:
+
+@example
+clear mod1
+clear mod2
+keycode 66 = Meta_L
+keycode 63 = Mode_switch
+add mod1 = Meta_L
+@end example
+
+This leaves the command key alone and uses alt/option for Meta.
+
+
@unnumberedsec 3.1: The Mouse
-@node Q3.1.1, Q3.1.2, Q3.0.11, Editing
+@node Q3.1.1, Q3.1.2, Q3.0.12, Editing
@unnumberedsubsec Q3.1.1: How can I turn off Mouse pasting?
I keep hitting the middle mouse button by accident and getting stuff
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Fix typo in comment on skip_debugger.
16 years, 6 months
Aidan Kehoe
changeset: 4665:9dd42cb187edfbef5f82985de4e44ad0af4c020d
parent: 4631:c6d4ffc018a641939bd983c1abbf7f9fc7de96ab
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Wed Feb 04 01:13:10 2009 +0900
files: src/ChangeLog src/eval.c
description:
Fix typo in comment on skip_debugger.
diff -r c6d4ffc018a641939bd983c1abbf7f9fc7de96ab -r 9dd42cb187edfbef5f82985de4e44ad0af4c020d src/ChangeLog
--- a/src/ChangeLog Sat Jan 31 17:43:20 2009 +0000
+++ b/src/ChangeLog Wed Feb 04 01:13:10 2009 +0900
@@ -1,3 +1,7 @@ 2009-01-31 Aidan Kehoe <kehoea@parhasa
+2009-02-04 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * eval.c (skip_debugger): Fix typo in preceding comment.
+
2009-01-31 Aidan Kehoe <kehoea(a)parhasard.net>
* unicode.c (unicode_convert):
diff -r c6d4ffc018a641939bd983c1abbf7f9fc7de96ab -r 9dd42cb187edfbef5f82985de4e44ad0af4c020d src/eval.c
--- a/src/eval.c Sat Jan 31 17:43:20 2009 +0000
+++ b/src/eval.c Wed Feb 04 01:13:10 2009 +0900
@@ -600,7 +600,7 @@ wants_debugger (Lisp_Object list, Lisp_O
/* Return 1 if an error with condition-symbols CONDITIONS,
and described by SIGNAL-DATA, should skip the debugger
- according to debugger-ignore-errors. */
+ according to debug-ignored-errors. */
static int
skip_debugger (Lisp_Object conditions, Lisp_Object data)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: #'check-coding-systems-region: return nil on success, not t.
16 years, 6 months
Aidan Kehoe
changeset: 4663:8cbca852bcd4a64915155e8ee26c5616dd34d623
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Feb 18 07:53:34 2009 +0000
files: lisp/ChangeLog lisp/coding.el tests/ChangeLog tests/automated/query-coding-tests.el
description:
#'check-coding-systems-region: return nil on success, not t.
lisp/ChangeLog addition:
2009-02-18 Aidan Kehoe <kehoea(a)parhasard.net>
* coding.el (check-coding-systems-region):
Return null on success, not t. See
http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1723
tests/ChangeLog addition:
2009-02-18 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/query-coding-tests.el : Check that
#'check-coding-systems-region returns null on success here, not t.
diff -r 127dbf03e1af1acd6796b7e66bc35b6628d91886 -r 8cbca852bcd4a64915155e8ee26c5616dd34d623 lisp/ChangeLog
--- a/lisp/ChangeLog Tue Feb 17 13:42:36 2009 +0000
+++ b/lisp/ChangeLog Wed Feb 18 07:53:34 2009 +0000
@@ -1,3 +1,9 @@ 2009-02-17 Aidan Kehoe <kehoea@parhasa
+2009-02-18 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * coding.el (check-coding-systems-region):
+ Return null on success, not t. See
+ http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1723
+
2009-02-17 Aidan Kehoe <kehoea(a)parhasard.net>
* mule/mule-cmds.el (finish-set-language-environment):
diff -r 127dbf03e1af1acd6796b7e66bc35b6628d91886 -r 8cbca852bcd4a64915155e8ee26c5616dd34d623 lisp/coding.el
--- a/lisp/coding.el Tue Feb 17 13:42:36 2009 +0000
+++ b/lisp/coding.el Wed Feb 18 07:53:34 2009 +0000
@@ -589,8 +589,7 @@ encode.
encode.
If all coding systems in CODING-SYSTEM-LIST can encode the region,
-this function returns t. This conflicts with the documented, but not
-with the observed, GNU behavior.
+this function returns nil.
If BEGIN is a string, `check-coding-systems-region' ignores END, and checks
whether the coding systems can encode BEGIN. The alist that is returned
@@ -619,7 +618,7 @@ This function is for GNU compatibility.
(setq intermediate (list (coding-system-name coding-system)))
(map-range-table range-lambda ranges)
(push (nreverse intermediate) result)))
- finally return (or result t)))))
+ finally return result))))
(if (stringp begin)
(with-temp-buffer
(insert begin)
diff -r 127dbf03e1af1acd6796b7e66bc35b6628d91886 -r 8cbca852bcd4a64915155e8ee26c5616dd34d623 tests/ChangeLog
--- a/tests/ChangeLog Tue Feb 17 13:42:36 2009 +0000
+++ b/tests/ChangeLog Wed Feb 18 07:53:34 2009 +0000
@@ -1,3 +1,8 @@ 2009-02-17 Aidan Kehoe <kehoea@parhasa
+2009-02-18 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/query-coding-tests.el : Check that
+ #'check-coding-systems-region returns null on success here, not t.
+
2009-02-17 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/mule-tests.el (featurep):
diff -r 127dbf03e1af1acd6796b7e66bc35b6628d91886 -r 8cbca852bcd4a64915155e8ee26c5616dd34d623 tests/automated/query-coding-tests.el
--- a/tests/automated/query-coding-tests.el Tue Feb 17 13:42:36 2009 +0000
+++ b/tests/automated/query-coding-tests.el Wed Feb 18 07:53:34 2009 +0000
@@ -413,9 +413,9 @@ iso-latin-with-esc-unix-1"))
"check #'unencodable-char-position stops at 7 if 2000 asked for")
;; Now, #'check-coding-systems-region.
;; UTF-8 should certainly be able to encode these characters:
- (Assert (eq t (check-coding-systems-region (point-min) (point-max)
+ (Assert (null (check-coding-systems-region (point-min) (point-max)
'(utf-8)))
- "check #'check-coding-systems-region gives t if encoding works")
+ "check #'check-coding-systems-region gives nil if encoding works")
(Assert
(equal '((iso-8859-1 257 258 259 260 261 262 263)
(windows-1252 129 130 131 132 133 134 135 136
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Fix a byte compiler bug with characters above ?\xFF.
16 years, 6 months
Aidan Kehoe
changeset: 4664:a9f83990e6bf2c423b10d6e8f9b5fc0c14ae3831
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Feb 22 19:57:28 2009 +0000
files: lisp/ChangeLog lisp/bytecomp.el tests/ChangeLog tests/automated/mule-tests.el
description:
Fix a byte compiler bug with characters above ?\xFF.
lisp/ChangeLog addition:
2009-02-22 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp.el (byte-compile-force-escape-quoted): New variable,
used to force `byte-compile-insert-header' to treat the output as
having characters above ?\xFF.
(byte-compile-from-buffer):
If the compiled output contains characters above ?\xFF, and
byte-compile-dynamic-docstrings or byte-compile-dynamic is non-nil
(or we're using an inappropriate coding system) recompile the
file, turning off the dynamic features and using a more
appropriate header.
(byte-compile-insert-header): Pay attention to
byte-compile-force-escape-quoted.
tests/ChangeLog addition:
2009-02-22 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/mule-tests.el:
Use more realistic tests for the escape-quoted mule encoding
checks; update a comment, change a Known-Bug-Expect-Failure to a
normal test now that we've addressed an old bug.
diff -r 8cbca852bcd4a64915155e8ee26c5616dd34d623 -r a9f83990e6bf2c423b10d6e8f9b5fc0c14ae3831 lisp/ChangeLog
--- a/lisp/ChangeLog Wed Feb 18 07:53:34 2009 +0000
+++ b/lisp/ChangeLog Sun Feb 22 19:57:28 2009 +0000
@@ -1,3 +1,17 @@ 2009-02-18 Aidan Kehoe <kehoea@parhasa
+2009-02-22 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * bytecomp.el (byte-compile-force-escape-quoted): New variable,
+ used to force `byte-compile-insert-header' to treat the output as
+ having characters above ?\xFF.
+ (byte-compile-from-buffer):
+ If the compiled output contains characters above ?\xFF, and
+ byte-compile-dynamic-docstrings or byte-compile-dynamic is non-nil
+ (or we're using an inappropriate coding system) recompile the
+ file, turning off the dynamic features and using a more
+ appropriate header.
+ (byte-compile-insert-header): Pay attention to
+ byte-compile-force-escape-quoted.
+
2009-02-18 Aidan Kehoe <kehoea(a)parhasard.net>
* coding.el (check-coding-systems-region):
diff -r 8cbca852bcd4a64915155e8ee26c5616dd34d623 -r a9f83990e6bf2c423b10d6e8f9b5fc0c14ae3831 lisp/bytecomp.el
--- a/lisp/bytecomp.el Wed Feb 18 07:53:34 2009 +0000
+++ b/lisp/bytecomp.el Sun Feb 22 19:57:28 2009 +0000
@@ -438,6 +438,13 @@ early in the file.")
"Alist of variables bound in the context of the current form,
that is, the current lexical environment. This list lives partly
on the specbind stack. The cdr of each cell is an integer bitmask.")
+
+(defvar byte-compile-force-escape-quoted nil
+ "If non-nil, `byte-compile-insert-header' always adds a coding cookie.
+
+This is for situations where the byte compiler output file needs to be
+able to encode character values above ?\\xFF, but this cannot be
+easily determined from the input file.")
(defconst byte-compile-referenced-bit 1)
(defconst byte-compile-assigned-bit 2)
@@ -1710,6 +1717,9 @@ With argument, insert value in current b
;; (byte-compile-warnings (if (eq byte-compile-warnings t)
;; byte-compile-warning-types
;; byte-compile-warnings))
+ (byte-compile-force-escape-quoted byte-compile-force-escape-quoted)
+ (byte-compile-using-dynamic nil)
+ (byte-compile-using-escape-quoted nil)
)
(byte-compile-close-variables
(save-excursion
@@ -1723,7 +1733,11 @@ With argument, insert value in current b
(byte-compile-insert-header filename
byte-compile-inbuffer
byte-compile-outbuffer))
-
+ (setq byte-compile-using-dynamic
+ (or (symbol-value-in-buffer 'byte-compile-dynamic
+ byte-compile-inbuffer)
+ (symbol-value-in-buffer 'byte-compile-dynamic-docstrings
+ byte-compile-inbuffer)))
;; This is a kludge. Some operating systems (OS/2, DOS) need to
;; write files containing binary information specially.
;; Under most circumstances, such files will be in binary
@@ -1733,6 +1747,9 @@ With argument, insert value in current b
(setq overwrite-mode 'overwrite-mode-binary))
(displaying-byte-compile-warnings
(save-excursion
+ ;; All our save-excursions may have led to a less-than-useful
+ ;; value for point in the outbuffer:
+ (goto-char (point-max byte-compile-outbuffer) byte-compile-outbuffer)
(set-buffer byte-compile-inbuffer)
(goto-char 1)
@@ -1753,7 +1770,22 @@ With argument, insert value in current b
(setq byte-compile-unresolved-functions nil)))
(save-excursion
(set-buffer byte-compile-outbuffer)
- (goto-char (point-min))))
+ (goto-char (point-min))
+ (when (and (or byte-compile-using-dynamic
+ (eq buffer-file-coding-system 'raw-text-unix))
+ (re-search-forward "[^\x00-\xff]" nil t))
+ (when (or noninteractive byte-compile-verbose)
+ (message
+ "%s: includes char above ?\\xFF, recompiling sans dynamic features."
+ filename))
+ (set-symbol-value-in-buffer 'byte-compile-dynamic nil
+ byte-compile-inbuffer)
+ (set-symbol-value-in-buffer 'byte-compile-dynamic-docstrings nil
+ byte-compile-inbuffer)
+ (setq byte-compile-force-escape-quoted t
+ byte-compile-outbuffer
+ (byte-compile-from-buffer byte-compile-inbuffer
+ filename eval)))))
(if (not eval)
byte-compile-outbuffer
(let (form)
@@ -1842,23 +1874,25 @@ With argument, insert value in current b
;; Otherwise, use `raw-text' for maximum portability with non-Mule
;; Emacsen.
(if (or (featurep '(not mule)) ;; Don't scan buffer if we are not muleized
- (save-excursion
- (set-buffer byte-compile-inbuffer)
- (goto-char (point-min))
- ;; Look for any non-Latin-1 literals or Unicode character
- ;; escapes. Any such occurrences in a @#COUNT comment will lead
- ;; to an escape-quoted coding cookie being inserted, but this is
- ;; not true of ordinary comments.
- (let ((non-latin-1-re
- (concat "[^\000-\377]"
- #r"\|\\u[0-9a-fA-F]\{4,4\}\|\\U[0-9a-fA-F]\{8,8\}"))
- (case-fold-search nil))
- (catch 'need-to-escape-quote
- (while (re-search-forward non-latin-1-re nil t)
- (skip-chars-backward "^;" (point-at-bol))
- (if (bolp) (throw 'need-to-escape-quote nil))
- (forward-line 1))
- t))))
+ (and
+ (not byte-compile-force-escape-quoted)
+ (save-excursion
+ (set-buffer byte-compile-inbuffer)
+ (goto-char (point-min))
+ ;; Look for any non-Latin-1 literals or Unicode character
+ ;; escapes. Any such occurrences in a @#COUNT comment will lead
+ ;; to an escape-quoted coding cookie being inserted, but this is
+ ;; not true of ordinary comments.
+ (let ((non-latin-1-re
+ (concat "[^\000-\377]"
+ #r"\|\\u[0-9a-fA-F]\{4,4\}\|\\U[0-9a-fA-F]\{8,8\}"))
+ (case-fold-search nil))
+ (catch 'need-to-escape-quote
+ (while (re-search-forward non-latin-1-re nil t)
+ (skip-chars-backward "^;" (point-at-bol))
+ (if (bolp) (throw 'need-to-escape-quote nil))
+ (forward-line 1))
+ t)))))
(setq buffer-file-coding-system 'raw-text-unix)
(insert "(or (featurep 'mule) (error \"Loading this file requires Mule support\"))
;;;###coding system: escape-quoted\n")
diff -r 8cbca852bcd4a64915155e8ee26c5616dd34d623 -r a9f83990e6bf2c423b10d6e8f9b5fc0c14ae3831 tests/ChangeLog
--- a/tests/ChangeLog Wed Feb 18 07:53:34 2009 +0000
+++ b/tests/ChangeLog Sun Feb 22 19:57:28 2009 +0000
@@ -1,3 +1,10 @@ 2009-02-18 Aidan Kehoe <kehoea@parhasa
+2009-02-22 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/mule-tests.el:
+ Use more realistic tests for the escape-quoted mule encoding
+ checks; update a comment, change a Known-Bug-Expect-Failure to a
+ normal test now that we've addressed an old bug.
+
2009-02-18 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/query-coding-tests.el : Check that
diff -r 8cbca852bcd4a64915155e8ee26c5616dd34d623 -r a9f83990e6bf2c423b10d6e8f9b5fc0c14ae3831 tests/automated/mule-tests.el
--- a/tests/automated/mule-tests.el Wed Feb 18 07:53:34 2009 +0000
+++ b/tests/automated/mule-tests.el Sun Feb 22 19:57:28 2009 +0000
@@ -599,30 +599,24 @@ This is a naive implementation in Lisp.
((Assert-elc-is-escape-quoted ()
"Assert the current buffer has an escape-quoted cookie if compiled."
(save-excursion
- (let ((byte-compile-result (byte-compile-from-buffer
- (current-buffer) nil nil))
- (temporary-file-name (make-temp-name
- (expand-file-name "zjPQ2Pk"
- (temp-directory)))))
- (byte-compile-insert-header
- temporary-file-name
- (current-buffer)
- byte-compile-result)
+ (let* ((temporary-file-name (make-temp-name
+ (expand-file-name "zjPQ2Pk"
+ (temp-directory))))
+ (byte-compile-result (byte-compile-from-buffer
+ (current-buffer) temporary-file-name
+ nil)))
(Assert (string-match
"^;;;###coding system: escape-quoted"
(buffer-substring nil nil byte-compile-result))))))
(Assert-elc-has-no-specified-encoding ()
"Assert the current buffer has no coding cookie if compiled."
(save-excursion
- (let ((byte-compile-result (byte-compile-from-buffer
- (current-buffer) nil nil))
- (temporary-file-name (make-temp-name
- (expand-file-name "zjPQ2Pk"
- (temp-directory)))))
- (byte-compile-insert-header
- temporary-file-name
- (current-buffer)
- byte-compile-result)
+ (let* ((temporary-file-name (make-temp-name
+ (expand-file-name "zjPQ2Pk"
+ (temp-directory))))
+ (byte-compile-result (byte-compile-from-buffer
+ (current-buffer) temporary-file-name
+ nil)))
(Assert (not (string-match
";;;###coding system:"
(buffer-substring nil nil
@@ -703,8 +697,8 @@ This is a naive implementation in Lisp.
(Assert-elc-has-no-specified-encoding)
(delete-region (point-min) (point-max))
- ;; This bug exists because the coding-cookie insertion code looks at
- ;; the input buffer, not the output buffer.
+ ;; There used to be a bug here because the coding-cookie insertion code
+ ;; looks at the input buffer, not the output buffer.
;;
;; It looks at the input buffer because byte-compile-dynamic and
;; byte-compile-dynamic-docstrings currently need to be
@@ -712,19 +706,20 @@ This is a naive implementation in Lisp.
;; compilation of function bodies and docstrings fails if you can't
;; call (point) and trivially get the byte offset in the file.
;;
- ;; And to unconditionally turn those two features off, you need to
- ;; know before byte-compilation whether the byte-compilation output
- ;; file contains non-Latin-1 characters, or perhaps to check after
- ;; compilation and redo; but we don't do the latter.
+ ;; And to unconditionally turn those two features off, you need to know
+ ;; before byte-compilation whether the byte-compilation output file
+ ;; contains non-Latin-1 characters. Or to check after compilation and
+ ;; redo; the latter is what we do right now. This will only be necessary
+ ;; in a very small minority of cases, it's not a performance-critical
+ ;; issue.
;;
- ;; To fix this bug, we need to add Mule support to
- ;; byte-compile-dynamic and byte-compile-dynamic-docstrings. Or drop
- ;; support for those features entirely.
+ ;; Martin Buchholz thinks, in bytecomp.el, that we should implement lazy
+ ;; loading for Mule files; I (Aidan Kehoe) don't think that's worth the
+ ;; effort today (February 2009).
(insert
"(defvar testing-mule-compilation-handling (eval-when-compile
(decode-char 'ucs #x371e))) ;; kDefinition beautiful; pretty, used\"")
- (Known-Bug-Expect-Failure
- (Assert-elc-is-escape-quoted))
+ (Assert-elc-is-escape-quoted)
(delete-region (point-min) (point-max))))
(Known-Bug-Expect-Error
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Correct a test failure uncovered by the last commit.
16 years, 6 months
Aidan Kehoe
changeset: 4662:127dbf03e1af1acd6796b7e66bc35b6628d91886
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue Feb 17 13:42:36 2009 +0000
files: lisp/ChangeLog lisp/mule/mule-cmds.el
description:
Correct a test failure uncovered by the last commit.
lisp/ChangeLog addition:
2009-02-17 Aidan Kehoe <kehoea(a)parhasard.net>
* mule/mule-cmds.el (finish-set-language-environment):
Correct this function, don't try to format non-control characters
with ^ followed by their value plus (char-int ?@).
diff -r 4dc42d1fe6845c6a072021ade8eb0f326543e17a -r 127dbf03e1af1acd6796b7e66bc35b6628d91886 lisp/ChangeLog
--- a/lisp/ChangeLog Tue Feb 17 13:39:25 2009 +0000
+++ b/lisp/ChangeLog Tue Feb 17 13:42:36 2009 +0000
@@ -1,3 +1,9 @@ 2009-02-17 Aidan Kehoe <kehoea@parhasa
+2009-02-17 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * mule/mule-cmds.el (finish-set-language-environment):
+ Correct this function, don't try to format non-control characters
+ with ^ followed by their value plus (char-int ?@).
+
2009-02-17 Aidan Kehoe <kehoea(a)parhasard.net>
* unicode.el (unicode-query-coding-region):
diff -r 4dc42d1fe6845c6a072021ade8eb0f326543e17a -r 127dbf03e1af1acd6796b7e66bc35b6628d91886 lisp/mule/mule-cmds.el
--- a/lisp/mule/mule-cmds.el Tue Feb 17 13:39:25 2009 +0000
+++ b/lisp/mule/mule-cmds.el Tue Feb 17 13:42:36 2009 +0000
@@ -780,14 +780,16 @@ the language environment for the major l
(setq string (decode-coding-string (string entry)
invalid-sequence-coding-system))
(when (= 1 (length string))
+ ;; Treat Unicode error sequence chars as the octets
+ ;; corresponding to those on disk:
+ (setq unicode-error-lookup
+ (get-char-table (aref string 0)
+ unicode-error-default-translation-table))
+ (when unicode-error-lookup
+ (setq string (format "%c" unicode-error-lookup)))
;; Treat control characters specially:
- (cond
- ((string-match "^[\x00-\x1f\x80-\x9f]$" string)
- (setq string (format "^%c" (+ ?@ (aref string 0)))))
- ((setq unicode-error-lookup
- (get-char-table (aref string 0)
- unicode-error-default-translation-table))
- (setq string (format "^%c" (+ ?@ unicode-error-lookup))))))
+ (when (string-match "^[\x00-\x1f\x80-\x9f]$" string)
+ (setq string (format "^%c" (+ ?@ (aref string 0))))))
(setq glyph (make-glyph (vector 'string :data string)))
(set-glyph-face glyph 'unicode-invalid-sequence-warning-face)
(put-char-table key glyph disp-table)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Fix query-coding-tests.el failures, non-mule ELCs, mule build.
16 years, 6 months
Aidan Kehoe
changeset: 4660:75e7ab37b6c82851c054e51bb9a4cecf86f2d228
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue Feb 17 08:35:13 2009 +0000
files: lisp/ChangeLog lisp/unicode.el
description:
Fix query-coding-tests.el failures, non-mule ELCs, mule build.
lisp/ChangeLog addition:
2009-02-17 Aidan Kehoe <kehoea(a)parhasard.net>
* unicode.el (unicode-query-coding-region):
Avoid eval-when-compile where that gives incorrect results when
compiled on a non-Mule XEmacs but run on a Mule XEmacs. Fixes
problems seen by
20a807210902131835o2f25930apaffabb6b62a95e5f(a)mail.gmail.com ,
thank you Vin!
(An equivalent way to get the efficiency of the eval-when-compile
would be to provide two defvars, evaluated at dump time, but this
code will be in C soon enough, and we can use the relevant
preprocessor constants there.)
diff -r 69cd8e2d2a88cdb49a5ac2e83fa2fd06b7a15484 -r 75e7ab37b6c82851c054e51bb9a4cecf86f2d228 lisp/ChangeLog
--- a/lisp/ChangeLog Sun Feb 15 12:32:48 2009 +0000
+++ b/lisp/ChangeLog Tue Feb 17 08:35:13 2009 +0000
@@ -1,3 +1,16 @@ 2009-02-02 Aidan Kehoe <kehoea@parhasa
+2009-02-17 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * unicode.el (unicode-query-coding-region):
+ Avoid eval-when-compile where that gives incorrect results when
+ compiled on a non-Mule XEmacs but run on a Mule XEmacs. Fixes
+ problems seen by
+ 20a807210902131835o2f25930apaffabb6b62a95e5f(a)mail.gmail.com ,
+ thank you Vin!
+ (An equivalent way to get the efficiency of the eval-when-compile
+ would be to provide two defvars, evaluated at dump time, but this
+ code will be in C soon enough, and we can use the relevant
+ preprocessor constants there.)
+
2009-02-02 Aidan Kehoe <kehoea(a)parhasard.net>
* descr-text.el (describe-char-unicodedata-file):
diff -r 69cd8e2d2a88cdb49a5ac2e83fa2fd06b7a15484 -r 75e7ab37b6c82851c054e51bb9a4cecf86f2d228 lisp/unicode.el
--- a/lisp/unicode.el Sun Feb 15 12:32:48 2009 +0000
+++ b/lisp/unicode.el Tue Feb 17 08:35:13 2009 +0000
@@ -640,6 +640,14 @@ specified, and as not encodable if it is
(ranges (make-range-table))
(looking-at-arg (concat "[" skip-chars-arg "]"))
(case-fold-search nil)
+ (invalid-sequence-lower-unicode-bound
+ (char-to-unicode
+ (aref (decode-coding-string "\xd8\x00\x00\x00"
+ 'utf-16-be) 3)))
+ (invalid-sequence-upper-unicode-bound
+ (char-to-unicode
+ (aref (decode-coding-string "\xd8\x00\x00\xFF"
+ 'utf-16-be) 3)))
fail-range-start fail-range-end char-after failed
extent char-unicode failed-reason previous-failed-reason)
(save-excursion
@@ -662,16 +670,10 @@ specified, and as not encodable if it is
;; If the character is in the Unicode range that
;; corresponds to an invalid octet, we want to
;; treat it as unencodable.
- (<= (eval-when-compile
- (char-to-unicode
- (aref (decode-coding-string "\xd8\x00\x00\x00"
- 'utf-16-be) 3)))
+ (<= invalid-sequence-lower-unicode-bound
char-unicode)
(<= char-unicode
- (eval-when-compile
- (char-to-unicode
- (aref (decode-coding-string "\xd8\x00\x00\xFF"
- 'utf-16-be) 3))))
+ invalid-sequence-upper-unicode-bound)
(setq failed-reason 'invalid-sequence)))
(or (null previous-failed-reason)
(eq previous-failed-reason failed-reason)))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Make the majority of tests in tests/automated/mule-tests.el work again.
16 years, 6 months
Aidan Kehoe
changeset: 4661:4dc42d1fe6845c6a072021ade8eb0f326543e17a
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue Feb 17 13:39:25 2009 +0000
files: tests/ChangeLog tests/automated/mule-tests.el
description:
Make the majority of tests in tests/automated/mule-tests.el work again.
tests/ChangeLog addition:
2009-02-17 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/mule-tests.el (featurep):
Add a missing parenthesis here, thank you
Stephen. Cf. http://mid.gmane.org/871vtzrxey.fsf@xemacs.org .
diff -r 75e7ab37b6c82851c054e51bb9a4cecf86f2d228 -r 4dc42d1fe6845c6a072021ade8eb0f326543e17a tests/ChangeLog
--- a/tests/ChangeLog Tue Feb 17 08:35:13 2009 +0000
+++ b/tests/ChangeLog Tue Feb 17 13:39:25 2009 +0000
@@ -1,3 +1,9 @@ 2009-02-10 Aidan Kehoe <kehoea@parhasa
+2009-02-17 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/mule-tests.el (featurep):
+ Add a missing parenthesis here, thank you
+ Stephen. Cf. http://mid.gmane.org/871vtzrxey.fsf@xemacs.org .
+
2009-02-10 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/lisp-tests.el :
diff -r 75e7ab37b6c82851c054e51bb9a4cecf86f2d228 -r 4dc42d1fe6845c6a072021ade8eb0f326543e17a tests/automated/mule-tests.el
--- a/tests/automated/mule-tests.el Tue Feb 17 08:35:13 2009 +0000
+++ b/tests/automated/mule-tests.el Tue Feb 17 13:39:25 2009 +0000
@@ -455,7 +455,7 @@ This is a naive implementation in Lisp.
utf-16-big-endian))
(Assert (equal (encode-coding-string
(decode-char 'ucs code-point) 'utf-16-le)
- utf-16-little-endian))
+ utf-16-little-endian)))
;;---------------------------------------------------------------
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Merge, add a ChangeLog entry.
16 years, 6 months
Aidan Kehoe
changeset: 4659:69cd8e2d2a88cdb49a5ac2e83fa2fd06b7a15484
parent: 4657:ad2d2f4848f5bb9cb7041ffb495903156acdc114
parent: 4658:2d9ba8d925b21985ea085a67a14f6671a77e80b4
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Feb 15 12:32:48 2009 +0000
files: lisp/ChangeLog lisp/descr-text.el
description:
Merge, add a ChangeLog entry.
diff -r ad2d2f4848f5bb9cb7041ffb495903156acdc114 -r 69cd8e2d2a88cdb49a5ac2e83fa2fd06b7a15484 lisp/ChangeLog
--- a/lisp/ChangeLog Fri Feb 13 15:44:05 2009 +0000
+++ b/lisp/ChangeLog Sun Feb 15 12:32:48 2009 +0000
@@ -1,3 +1,10 @@ 2009-02-02 Aidan Kehoe <kehoea@parhasa
+2009-02-02 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * descr-text.el (describe-char-unicodedata-file):
+ Back out Stephen's change of 2009-01-01, 16c9098dd3d2; do a
+ Mercurial merge, add this ChangeLog entry.
+ See also http://mid.gmane.org/8763jbsyr7.fsf@xemacs.org .
+
2009-02-02 Aidan Kehoe <kehoea(a)parhasard.net>
* mule/latin.el (macintosh):
diff -r ad2d2f4848f5bb9cb7041ffb495903156acdc114 -r 69cd8e2d2a88cdb49a5ac2e83fa2fd06b7a15484 lisp/descr-text.el
--- a/lisp/descr-text.el Fri Feb 13 15:44:05 2009 +0000
+++ b/lisp/descr-text.el Sun Feb 15 12:32:48 2009 +0000
@@ -209,18 +209,40 @@ otherwise."
(insert "There are text properties here:\n")
(describe-property-list properties)))))
-;; XEmacs change
-(defcustom describe-char-unicodedata-file nil
+(defcustom describe-char-unicodedata-file
+ ;; XEmacs change; initialise this by default, using Perl.
+ (let ((have-perl
+ (member-if
+ #'(lambda (path)
+ (file-exists-p (format "%s%cperl" path directory-sep-char)))
+ exec-path))
+ installprivlib res)
+ (when have-perl
+ (setq installprivlib
+ (with-string-as-buffer-contents ""
+ (shell-command "perl -V:installprivlib" t)
+ ;; 1+ because buffer offsets start at one.
+ (delete-region 1 (1+ (length "installprivlib='")))
+ ;; Delete the final newline, semicolon and quotation mark.
+ (delete-region (- (point-max) 3) (point-max))))
+ (cond
+ ((file-exists-p
+ (setq res
+ (format "%s%cunicore%cUnicodeData.txt"
+ installprivlib directory-sep-char directory-sep-char))))
+ ((file-exists-p
+ (setq res
+ (format "%s%cunicode%cUnicodeData.txt"
+ installprivlib directory-sep-char directory-sep-char)))))
+ res))
"Location of Unicode data file.
This is the UnicodeData.txt file from the Unicode Consortium, used for
diagnostics. If it is non-nil `describe-char' will print data
looked up from it. This facility is mostly of use to people doing
multilingual development.
-This is a fairly large file, installed on many systems by Perl, in the
-`unicore' subdirectory of the Perl library tree \(\"perl -V:installprivlib\"
-will tell you where that is.) You can also get the current version from the
-Unicode Consortium at the URL
+This is a fairly large file, typically installed with Perl.
+At the time of writing it is at the URL
`http://www.unicode.org/Public/UNIDATA/UnicodeData.txt'.
It is possible to build a DBM or Berkeley index cache for this file, so that
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches