Mercurial > hg > xemacs-beta
comparison lisp/mule/cyril-util.el @ 4454:1f0aa40cafe0
Small improvements in disp-table.el, mule/cyril-util.el.
2008-05-11 Aidan Kehoe <kehoea@parhasard.net>
* disp-table.el (make-display-table):
[...] Also, I previously said #xFF when I meant
?\xFF; correct this.
* mule/cyril-util.el (standard-display-cyrillic-translit):
Make the selection of the default language more sensible; change
the API a little to make a sensible default Cyrillic language
available, checking current-language-environment.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 11 May 2008 12:03:07 +0200 |
parents | e214ff9f9507 |
children |
comparison
equal
deleted
inserted
replaced
4453:29efd169efe7 | 4454:1f0aa40cafe0 |
---|---|
41 '(("Belorussian") ("Bulgarian") ("Macedonian") ("Russian") ("Serbian") | 41 '(("Belorussian") ("Bulgarian") ("Macedonian") ("Russian") ("Serbian") |
42 ("Ukrainian")) | 42 ("Ukrainian")) |
43 "*List of known Cyrillic languages") | 43 "*List of known Cyrillic languages") |
44 | 44 |
45 ;;;###autoload | 45 ;;;###autoload |
46 (defun standard-display-cyrillic-translit (&optional cyrillic-language) | 46 (defun standard-display-cyrillic-translit (&optional cyrillic-language |
47 disable) | |
47 "Display a cyrillic buffer using a transliteration. | 48 "Display a cyrillic buffer using a transliteration. |
48 For readability, the table is slightly | 49 For readability, the table is slightly |
49 different from the one used for the input method `cyrillic-translit'. | 50 different from the one used for the input method `cyrillic-translit'. |
50 | 51 |
51 The argument is a string which specifies which language you are using; | 52 The argument is a string which specifies which language you are using; |
52 that affects the choice of transliterations slightly. | 53 that affects the choice of transliterations slightly. |
53 Possible values are listed in 'cyrillic-language-alist'. | 54 Possible values are listed in 'cyrillic-language-alist'. |
54 If the argument is t, we use the default cyrillic transliteration. | 55 |
55 If the argument is nil, we return the display table to its standard state." | 56 Specifying a prefix arg, by preceding |
57 \\[standard-display-cyrillic-translit] with \\[universal-argument] | |
58 turns off Cyrillic display. Noninteractively, the DISABLE argument | |
59 does the same thing. " | |
56 (interactive | 60 (interactive |
57 (list | 61 (list |
58 (let* ((completion-ignore-case t)) | 62 (let* ((completion-ignore-case t) |
59 (completing-read | 63 (default-language (if (assoc-ignore-case |
60 "Cyrillic language (default nil): " | 64 current-language-environment |
61 cyrillic-language-alist nil t nil nil nil)))) | 65 cyrillic-language-alist) |
62 (when (equal cyrillic-language "") | 66 current-language-environment |
63 (setq cyrillic-language nil)) | 67 "Russian"))) |
68 (or current-prefix-arg | |
69 (completing-read | |
70 (format "Cyrillic language (default %s): " default-language) | |
71 cyrillic-language-alist nil t nil nil default-language))))) | |
64 (frob-display-table | 72 (frob-display-table |
65 (lambda (display-table) | 73 (lambda (display-table) |
66 (if (null cyrillic-language) | 74 (if (or disable current-prefix-arg) |
67 (if (char-table-p display-table) | 75 (if (char-table-p display-table) |
68 (remove-char-table 'cyrillic-iso8859-5 display-table)) | 76 (remove-char-table 'cyrillic-iso8859-5 display-table)) |
69 (put-display-table ?,LP(B "a" display-table) | 77 (put-display-table ?,LP(B "a" display-table) |
70 (put-display-table ?,LQ(B "b" display-table) | 78 (put-display-table ?,LQ(B "b" display-table) |
71 (put-display-table ?,LR(B "v" display-table) | 79 (put-display-table ?,LR(B "v" display-table) |