changeset: 4480:1f0aa40cafe090edac8b2a0584e86050da240da7
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun May 11 12:03:07 2008 +0200
files: lisp/ChangeLog lisp/disp-table.el lisp/mule/cyril-util.el
description:
Small improvements in disp-table.el, mule/cyril-util.el.
2008-05-11 Aidan Kehoe <kehoea(a)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.
diff -r 29efd169efe7d04bdb511dcd275f5691dc149997 -r
1f0aa40cafe090edac8b2a0584e86050da240da7 lisp/ChangeLog
--- a/lisp/ChangeLog Sun May 11 11:24:01 2008 +0200
+++ b/lisp/ChangeLog Sun May 11 12:03:07 2008 +0200
@@ -2,7 +2,12 @@ 2008-05-11 Aidan Kehoe <kehoea@parhasa
* disp-table.el (make-display-table):
Update the example code to make it more general, and more
- compatible with GNU.
+ compatible with GNU. 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.
2007-07-21 Aidan Kehoe <kehoea(a)parhasard.net>
diff -r 29efd169efe7d04bdb511dcd275f5691dc149997 -r
1f0aa40cafe090edac8b2a0584e86050da240da7 lisp/disp-table.el
--- a/lisp/disp-table.el Sun May 11 11:24:01 2008 +0200
+++ b/lisp/disp-table.el Sun May 11 12:03:07 2008 +0200
@@ -39,7 +39,7 @@
This returns a generic character table; previously it returned a vector, but
that was not helpful when dealing with internationalized characters above
-#xFF. See `make-char-table' for details of character tables in general. To
+?\xFF. See `make-char-table' for details of character tables in general. To
write code that works with both vectors and character tables, add something
like the following to the beginning of your file, and use
`put-display-table' to set what a given character is displayed as, and
diff -r 29efd169efe7d04bdb511dcd275f5691dc149997 -r
1f0aa40cafe090edac8b2a0584e86050da240da7 lisp/mule/cyril-util.el
--- a/lisp/mule/cyril-util.el Sun May 11 11:24:01 2008 +0200
+++ b/lisp/mule/cyril-util.el Sun May 11 12:03:07 2008 +0200
@@ -43,7 +43,8 @@
"*List of known Cyrillic languages")
;;;###autoload
-(defun standard-display-cyrillic-translit (&optional cyrillic-language)
+(defun standard-display-cyrillic-translit (&optional cyrillic-language
+ disable)
"Display a cyrillic buffer using a transliteration.
For readability, the table is slightly
different from the one used for the input method `cyrillic-translit'.
@@ -51,19 +52,26 @@ The argument is a string which specifies
The argument is a string which specifies which language you are using;
that affects the choice of transliterations slightly.
Possible values are listed in 'cyrillic-language-alist'.
-If the argument is t, we use the default cyrillic transliteration.
-If the argument is nil, we return the display table to its standard state."
+
+Specifying a prefix arg, by preceding
+\\[standard-display-cyrillic-translit] with \\[universal-argument]
+turns off Cyrillic display. Noninteractively, the DISABLE argument
+does the same thing. "
(interactive
(list
- (let* ((completion-ignore-case t))
- (completing-read
- "Cyrillic language (default nil): "
- cyrillic-language-alist nil t nil nil nil))))
- (when (equal cyrillic-language "")
- (setq cyrillic-language nil))
+ (let* ((completion-ignore-case t)
+ (default-language (if (assoc-ignore-case
+ current-language-environment
+ cyrillic-language-alist)
+ current-language-environment
+ "Russian")))
+ (or current-prefix-arg
+ (completing-read
+ (format "Cyrillic language (default %s): " default-language)
+ cyrillic-language-alist nil t nil nil default-language)))))
(frob-display-table
(lambda (display-table)
- (if (null cyrillic-language)
+ (if (or disable current-prefix-arg)
(if (char-table-p display-table)
(remove-char-table 'cyrillic-iso8859-5 display-table))
(put-display-table ?,LP(B "a" display-table)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches