aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert1999-10-19 07:20:09 +0000
committerPaul Eggert1999-10-19 07:20:09 +0000
commit40c81f74c34aa35f0cba7adccf9177a6e5f9940d (patch)
tree21bd05fb9f2c3350dec05ee3b919caf3342c3996
parent64ed733adadc4012f0182b1daee7e105994e85d0 (diff)
downloademacs-40c81f74c34aa35f0cba7adccf9177a6e5f9940d.tar.gz
emacs-40c81f74c34aa35f0cba7adccf9177a6e5f9940d.zip
* international/mule-cmds.el (global-map):
Do not use backquote, because that makes a bootstrapping problem if you need to recompile all Lisp files using interpreted code. * international/mule.el (charset-id, charset-bytes, charset-dimension, charset-chars, charset-width, charset-direction, charset-iso-final-char, charset-iso-graphic-plane, charset-reverse-charset, charset-short-name, charset-long-name, charset-description, charset-plist): Likewise. * international/mule-cmds.el (set-display-table-and-terminal-coding-system): New function, containing code migrated out of set-language-environment. (set-language-environment, set-locale-environment): Use it. (locale-translation-file-name): Moved here from startup.el. (locale-language-names, locale-preferred-coding-systems): New vars. (locale-name-match, set-locale-environment): New functions.
-rw-r--r--lisp/international/mule-cmds.el317
-rw-r--r--lisp/international/mule.el36
2 files changed, 328 insertions, 25 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 12d94900ad2..353f09d0d77 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -53,8 +53,11 @@
53 "Keymap for Mule (Multilingual environment) menu specific commands.") 53 "Keymap for Mule (Multilingual environment) menu specific commands.")
54 54
55(define-key global-map [menu-bar mule] 55(define-key global-map [menu-bar mule]
56 `(menu-item "Mule" ,mule-menu-keymap 56 ;; It is better not to use backquote here,
57 :visible default-enable-multibyte-characters)) 57 ;; because that makes a bootstrapping problem
58 ;; if you need to recompile all the Lisp files using interpreted code.
59 (list 'menu-item "Mule" mule-menu-keymap
60 ':visible 'default-enable-multibyte-characters))
58 61
59(setq menu-bar-final-items (cons 'mule menu-bar-final-items)) 62(setq menu-bar-final-items (cons 'mule menu-bar-final-items))
60 63
@@ -1216,6 +1219,16 @@ The default status is as follows:
1216 (setq nonascii-translation-table nil 1219 (setq nonascii-translation-table nil
1217 nonascii-insert-offset 0)) 1220 nonascii-insert-offset 0))
1218 1221
1222(defun set-display-table-and-terminal-coding-system (language-name)
1223 "Set up the display table and terminal coding system for LANGUAGE-NAME."
1224 (let ((coding (get-language-info language-name 'unibyte-display)))
1225 (if coding
1226 (standard-display-european-internal)
1227 (standard-display-default (if (eq window-system 'pc) 128 160) 255)
1228 (aset standard-display-table 146 nil))
1229 (or (eq window-system 'pc)
1230 (set-terminal-coding-system coding))))
1231
1219(defun set-language-environment (language-name) 1232(defun set-language-environment (language-name)
1220 "Set up multi-lingual environment for using LANGUAGE-NAME. 1233 "Set up multi-lingual environment for using LANGUAGE-NAME.
1221This sets the coding system priority and the default input method 1234This sets the coding system priority and the default input method
@@ -1291,14 +1304,7 @@ specifies the character set for the major languages of Western Europe."
1291 (with-current-buffer (car list) 1304 (with-current-buffer (car list)
1292 (set-case-table (standard-case-table))) 1305 (set-case-table (standard-case-table)))
1293 (setq list (cdr list)))))) 1306 (setq list (cdr list))))))
1294 ;; Display table and coding system for terminal. 1307 (set-display-table-and-terminal-coding-system language-name))
1295 (let ((coding (get-language-info language-name 'unibyte-display)))
1296 (if coding
1297 (standard-display-european-internal)
1298 (standard-display-default (if (eq window-system 'pc) 128 160) 255)
1299 (aset standard-display-table 146 nil))
1300 (or (eq window-system 'pc)
1301 (set-terminal-coding-system coding))))
1302 1308
1303 (let ((required-features (get-language-info language-name 'features))) 1309 (let ((required-features (get-language-info language-name 'features)))
1304 (while required-features 1310 (while required-features
@@ -1433,6 +1439,297 @@ of buffer-file-coding-system set by this function."
1433 (terpri))) 1439 (terpri)))
1434 (setq l (cdr l)))))))) 1440 (setq l (cdr l))))))))
1435 1441
1442;;; Locales.
1443
1444(defvar locale-translation-file-name
1445 (let ((files '("/usr/lib/X11/locale/locale.alias" ; e.g. X11R6.4
1446 "/usr/X11R6/lib/X11/locale/locale.alias" ; e.g. RedHat 4.2
1447 "/usr/openwin/lib/locale/locale.alias" ; e.g. Solaris 2.6
1448 ;;
1449 ;; The following name appears after the X-related names above,
1450 ;; since the X-related names are what X actually uses.
1451 "/usr/share/locale/locale.alias" ; GNU/Linux sans X
1452 )))
1453 (while (and files (not (file-exists-p (car files))))
1454 (setq files (cdr files)))
1455 (car files))
1456 "*File name for the system's file of locale-name aliases, or nil if none.")
1457
1458(defvar locale-language-names
1459 '(
1460 ;; UTF-8 is not yet implemented.
1461 ;; Put this first, so that e.g. "ko.UTF-8" does not match "ko" below.
1462 (".*[._]utf" . nil)
1463
1464 ;; Locale names of the form LANGUAGE[_TERRITORY][.CODESET][@MODIFIER]
1465 ;; as specified in the Single Unix Spec, Version 2.
1466 ;; LANGUAGE is a language code taken from ISO 639:1988 (E/F)
1467 ;; with additions from ISO 639/RA Newsletter No.1/1989;
1468 ;; see Internet RFC 2165 (1997-06).
1469 ;; TERRITORY is a country code taken from ISO 3166.
1470 ;; CODESET and MODIFIER are implementation-dependent.
1471 ;;
1472 ; aa Afar
1473 ; ab Abkhazian
1474 ("af" . "Latin-3") ; Afrikaans
1475 ("am" . "Ethiopic") ; Amharic
1476 ; ar Arabic
1477 ; as Assamese
1478 ; ay Aymara
1479 ; az Azerbaijani
1480 ; ba Bashkir
1481 ("be" . "Cyrillic-ISO") ; Byelorussian
1482 ("bg" . "Cyrillic-ISO") ; Bulgarian
1483 ; bh Bihari
1484 ; bi Bislama
1485 ; bn Bengali, Bangla
1486 ("bo" . "Tibetan")
1487 ("br" . "Latin-1") ; Breton
1488 ("ca" . "Latin-1") ; Catalan
1489 ; co Corsican
1490 ("cs" . "Czech")
1491 ; cy Welsh
1492 ("da" . "Latin-1") ; Danish
1493 ("de" . "German")
1494 ; dz Bhutani
1495 ("el" . "Greek")
1496 ("en" . "English")
1497 ("eo" . "Latin-3") ; Esperanto
1498 ("es" . "Latin-1") ; Spanish
1499 ("et" . "Latin-4") ; Estonian
1500 ("eu" . "Latin-1") ; Basque
1501 ; fa Persian
1502 ("fi" . "Latin-1") ; Finnish
1503 ; fj Fiji
1504 ("fo" . "Latin-1") ; Faroese
1505 ("fr" . "Latin-1") ; French
1506 ("fy" . "Latin-1") ; Frisian
1507 ("ga" . "Latin-1") ; Irish
1508 ; gd Scots Gaelic
1509 ("gl" . "Latin-3") ; Galician
1510 ; gn Guarani
1511 ; gu Gujarati
1512 ; ha Hausa
1513 ("he" . "Hebrew")
1514 ("hi" . "Devanagari") ; Hindi
1515 ("hr" . "Latin-2") ; Croatian
1516 ("hu" . "Latin-2") ; Hungarian
1517 ; hy Armenian
1518 ; ia Interlingua
1519 ("id" . "Latin-1") ; Indonesian
1520 ; ie Interlingue
1521 ; ik Inupiak
1522 ("is" . "Latin-1") ; Icelandic
1523 ("it" . "Latin-1") ; Italian
1524 ; iu Inuktitut
1525 ("ja" . "Japanese")
1526 ; jw Javanese
1527 ; ka Georgian
1528 ; kk Kazakh
1529 ("kl" . "Latin-4") ; Greenlandic
1530 ; km Cambodian
1531 ; kn Kannada
1532 ("ko" . "Korean")
1533 ; ks Kashmiri
1534 ; ku Kurdish
1535 ; ky Kirghiz
1536 ("la" . "Latin-1") ; Latin
1537 ; ln Lingala
1538 ("lo" . "Lao") ; Laothian
1539 ("lt" . "Latin-4") ; Lithuanian
1540 ("lv" . "Latin-4") ; Latvian, Lettish
1541 ; mg Malagasy
1542 ; mi Maori
1543 ("mk" . "Cyrillic-ISO") ; Macedonian
1544 ; ml Malayalam
1545 ; mn Mongolian
1546 ; mo Moldavian
1547 ("mr" . "Devanagari") ; Marathi
1548 ; ms Malay
1549 ("mt" . "Latin-3") ; Maltese
1550 ; my Burmese
1551 ; na Nauru
1552 ("ne" . "Devanagari") ; Nepali
1553 ("nl" . "Latin-1") ; Dutch
1554 ("no" . "Latin-1") ; Norwegian
1555 ; oc Occitan
1556 ; om (Afan) Oromo
1557 ; or Oriya
1558 ; pa Punjabi
1559 ("pl" . "Latin-2") ; Polish
1560 ; ps Pashto, Pushto
1561 ("pt" . "Latin-1") ; Portuguese
1562 ; qu Quechua
1563 ("rm" . "Latin-1") ; Rhaeto-Romance
1564 ; rn Kirundi
1565 ("ro" . "Romanian")
1566 ("ru.*[_.]koi8" . "Cyrillic-KOI8") ; Russian
1567 ("ru" . "Cyrillic-ISO") ; Russian
1568 ; rw Kinyarwanda
1569 ("sa" . "Devanagari") ; Sanskrit
1570 ; sd Sindhi
1571 ; sg Sangho
1572 ("sh" . "Latin-2") ; Serbo-Croatian
1573 ; si Sinhalese
1574 ("sk" . "Slovak")
1575 ("sl" . "Slovenian")
1576 ; sm Samoan
1577 ; sn Shona
1578 ; so Somali
1579 ("sq" . "Latin-2") ; Albanian
1580 ("sr" . "Latin-2") ; Serbian (Latin alphabet)
1581 ; ss Siswati
1582 ; st Sesotho
1583 ; su Sundanese
1584 ("sv" . "Latin-1") ; Swedish
1585 ("sw" . "Latin-1") ; Swahili
1586 ; ta Tamil
1587 ; te Telugu
1588 ; tg Tajik
1589 ("th" . "Thai")
1590 ; ti Tigrinya
1591 ; tk Turkmen
1592 ; tl Tagalog
1593 ; tn Setswana
1594 ; to Tonga
1595 ("tr" . "Latin-5") ; Turkish
1596 ; ts Tsonga
1597 ; tt Tatar
1598 ; tw Twi
1599 ; ug Uighur
1600 ("uk" . "Cyrillic-ISO") ; Ukrainian
1601 ; ur Urdu
1602 ; uz Uzbek
1603 ("vi" . "Vietnamese")
1604 ; vo Volapuk
1605 ; wo Wolof
1606 ; xh Xhosa
1607 ; yi Yiddish
1608 ; yo Yoruba
1609 ; za Zhuang
1610 ("zh.*[._]big5" . "Chinese-BIG5")
1611 ("zh.*[._]gbk" . nil) ; Solaris 2.7; has gbk-0 as well as GB 2312.1980-0
1612 ("zh_tw" . "Chinese-CNS")
1613 ("zh" . "Chinese-GB")
1614 ; zu Zulu
1615
1616 ;; ISO standard locales
1617 ("c$" . "ASCII")
1618 ("posix$" . "ASCII")
1619
1620 ;; generic ISO 8859 locales
1621 (".*8859[-_]?1" . "Latin-1")
1622 (".*8859[-_]?2" . "Latin-2")
1623 (".*8859[-_]?3" . "Latin-3")
1624 (".*8859[-_]?4" . "Latin-4")
1625 (".*8859[-_]?9" . "Latin-5")
1626 (".*8859[-_]?14" . "Latin-8")
1627 (".*8859[-_]?15" . "Latin-9")
1628
1629 ;; The "IPA" Emacs language environment does not correspond
1630 ;; to any ISO 639 code, so let it stand for itself.
1631 ("ipa$" . "IPA")
1632
1633 ;; Nonstandard or obsolete language codes
1634 ("cz" . "Czech") ; e.g. Solaris 2.6
1635 ("ee" . "Latin-4") ; Estonian, e.g. X11R6.4
1636 ("iw" . "Hebrew") ; e.g. X11R6.4
1637 ("sp" . "Cyrillic-ISO") ; Serbian (Cyrillic alphabet), e.g. X11R6.4
1638 ("su" . "Latin-1") ; Finnish, e.g. Solaris 2.6
1639 )
1640 "List of pairs of locale regexps and language names.
1641The first element whose locale regexp matches the start of a downcased
1642locale specifies the language name corresponding to that locale.
1643If the language name is nil, there is no corresponding language environment.")
1644
1645(defvar locale-preferred-coding-systems
1646 '(("ja.*[._]euc" . japanese-iso-8bit)
1647 ("ja.*[._]jis7" . iso-2022-jp)
1648 ("ja.*[._]pck" . japanese-shift-jis)
1649 ("ja.*[._]sjis" . japanese-shift-jis)
1650 (".*[._].*8859[-_]?1" . iso-8859-1)
1651 (".*[._].*8859[-_]?2" . iso-8859-2)
1652 (".*[._].*8859[-_]?3" . iso-8859-3)
1653 (".*[._].*8859[-_]?4" . iso-8859-4)
1654 (".*[._].*8859[-_]?5" . iso-8859-5)
1655 (".*[._].*8859[-_]?7" . iso-8859-7)
1656 (".*[._].*8859[-_]?8" . iso-8859-8)
1657 (".*[._].*8859[-_]?9" . iso-8859-9)
1658 )
1659 "List of pairs of locale regexps and coding systems.
1660The first element whose locale regexp matches the start of a downcased
1661locale specifies the coding system to prefer when using that locale.
1662If the coding system is nil, there is no special preference.")
1663
1664(defun locale-name-match (key alist)
1665 "Search for KEY in ALIST, which should be a list of regexp-value pairs.
1666Return the value corresponding to the first regexp that matches the
1667start of KEY, or nil if there is no match."
1668 (let (element)
1669 (while (and alist (not element))
1670 (if (string-match (concat "^\\(" (car (car alist)) "\\)") key)
1671 (setq element (car alist)))
1672 (setq alist (cdr alist)))
1673 (cdr element)))
1674
1675(defun set-locale-environment (locale-name)
1676 "Set up multi-lingual environment for using LOCALE-NAME.
1677This sets the coding system priority and the default input method
1678and sometimes other things. LOCALE-NAME should be a string
1679which is the name of a locale supported by the system;
1680often it is of the form xx_XX.CODE, where xx is a language,
1681XX is a country, and CODE specifies a character set and coding system.
1682For example, the locale name \"ja_JP.EUC\" might name a locale
1683for Japanese in Japan using the `japanese-iso-8bit' coding-system.
1684
1685If LOCALE-NAME is nil, its value is taken from the environment.
1686
1687The locale names supported by your system can typically be found in a
1688directory named `/usr/share/locale' or `/usr/lib/locale'."
1689
1690 (unless locale-name
1691 ;; Use the first of these three environment variables
1692 ;; that has a nonempty value.
1693 (let ((vars '("LC_ALL" "LC_CTYPE" "LANG")))
1694 (while (and vars (not (setq locale-name (getenv (car vars)))))
1695 (setq vars (cdr vars)))))
1696
1697 (when locale-name
1698
1699 ;; Translate "swedish" into "sv_SE.ISO8859-1", and so on,
1700 ;; using the translation file that many systems have.
1701 (when locale-translation-file-name
1702 (with-temp-buffer
1703 (insert-file-contents locale-translation-file-name)
1704 (when (re-search-forward
1705 (concat "^" (regexp-quote locale-name) ":?[ \t]+") nil t)
1706 (setq locale-name (buffer-substring (point) (line-end-position))))))
1707
1708 (setq locale-name (downcase locale-name))
1709
1710 (let ((language-name (locale-name-match
1711 locale-name locale-language-names))
1712 (coding-system (locale-name-match
1713 locale-name locale-preferred-coding-systems)))
1714 (when language-name
1715
1716 ;; Set up for this character set. This is now the right way
1717 ;; to do it for both unibyte and multibyte modes.
1718 (set-language-environment language-name)
1719
1720 ;; If default-enable-multibyte-characters is nil,
1721 ;; we are using single-byte characters,
1722 ;; so the display table and terminal coding system are irrelevant.
1723 (when default-enable-multibyte-characters
1724 (set-display-table-and-terminal-coding-system language-name))
1725
1726 (setq locale-coding-system
1727 (car (get-language-info language-name 'coding-priority))))
1728
1729 (when coding-system
1730 (prefer-coding-system coding-system)
1731 (setq locale-coding-system coding-system)))))
1732
1436;;; Charset property 1733;;; Charset property
1437 1734
1438(defun get-charset-property (charset propname) 1735(defun get-charset-property (charset propname)
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 01ac2a776ec..0a5bc95d81c 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -153,95 +153,101 @@ PLIST (property list) may contain any type of information a user
153 `get-charset-property' respectively." 153 `get-charset-property' respectively."
154 (get charset 'charset)) 154 (get charset 'charset))
155 155
156;; It is better not to use backquote in this file,
157;; because that makes a bootstrapping problem
158;; if you need to recompile all the Lisp files using interpreted code.
159
156(defmacro charset-id (charset) 160(defmacro charset-id (charset)
157 "Return charset identification number of CHARSET." 161 "Return charset identification number of CHARSET."
158 (if (charset-quoted-standard-p charset) 162 (if (charset-quoted-standard-p charset)
159 (aref (charset-info (nth 1 charset)) 0) 163 (aref (charset-info (nth 1 charset)) 0)
160 `(aref (charset-info ,charset) 0))) 164 (list 'aref (list 'charset-info charset) 0)))
161 165
162(defmacro charset-bytes (charset) 166(defmacro charset-bytes (charset)
163 "Return bytes of CHARSET. 167 "Return bytes of CHARSET.
164See the function `charset-info' for more detail." 168See the function `charset-info' for more detail."
165 (if (charset-quoted-standard-p charset) 169 (if (charset-quoted-standard-p charset)
166 (aref (charset-info (nth 1 charset)) 1) 170 (aref (charset-info (nth 1 charset)) 1)
167 `(aref (charset-info ,charset) 1))) 171 (list 'aref (list 'charset-info charset) 1)))
168 172
169(defmacro charset-dimension (charset) 173(defmacro charset-dimension (charset)
170 "Return dimension of CHARSET. 174 "Return dimension of CHARSET.
171See the function `charset-info' for more detail." 175See the function `charset-info' for more detail."
172 (if (charset-quoted-standard-p charset) 176 (if (charset-quoted-standard-p charset)
173 (aref (charset-info (nth 1 charset)) 2) 177 (aref (charset-info (nth 1 charset)) 2)
174 `(aref (charset-info ,charset) 2))) 178 (list 'aref (list 'charset-info charset) 2)))
175 179
176(defmacro charset-chars (charset) 180(defmacro charset-chars (charset)
177 "Return character numbers contained in a dimension of CHARSET. 181 "Return character numbers contained in a dimension of CHARSET.
178See the function `charset-info' for more detail." 182See the function `charset-info' for more detail."
179 (if (charset-quoted-standard-p charset) 183 (if (charset-quoted-standard-p charset)
180 (aref (charset-info (nth 1 charset)) 3) 184 (aref (charset-info (nth 1 charset)) 3)
181 `(aref (charset-info ,charset) 3))) 185 (list 'aref (list 'charset-info charset) 3)))
182 186
183(defmacro charset-width (charset) 187(defmacro charset-width (charset)
184 "Return width (how many column occupied on a screen) of CHARSET. 188 "Return width (how many column occupied on a screen) of CHARSET.
185See the function `charset-info' for more detail." 189See the function `charset-info' for more detail."
186 (if (charset-quoted-standard-p charset) 190 (if (charset-quoted-standard-p charset)
187 (aref (charset-info (nth 1 charset)) 4) 191 (aref (charset-info (nth 1 charset)) 4)
188 `(aref (charset-info ,charset) 4))) 192 (list 'aref (list 'charset-info charset) 4)))
189 193
190(defmacro charset-direction (charset) 194(defmacro charset-direction (charset)
191 "Return direction of CHARSET. 195 "Return direction of CHARSET.
192See the function `charset-info' for more detail." 196See the function `charset-info' for more detail."
193 (if (charset-quoted-standard-p charset) 197 (if (charset-quoted-standard-p charset)
194 (aref (charset-info (nth 1 charset)) 5) 198 (aref (charset-info (nth 1 charset)) 5)
195 `(aref (charset-info ,charset) 5))) 199 (list 'aref (list 'charset-info charset) 5)))
196 200
197(defmacro charset-iso-final-char (charset) 201(defmacro charset-iso-final-char (charset)
198 "Return final char of CHARSET. 202 "Return final char of CHARSET.
199See the function `charset-info' for more detail." 203See the function `charset-info' for more detail."
200 (if (charset-quoted-standard-p charset) 204 (if (charset-quoted-standard-p charset)
201 (aref (charset-info (nth 1 charset)) 8) 205 (aref (charset-info (nth 1 charset)) 8)
202 `(aref (charset-info ,charset) 8))) 206 (list 'aref (list 'charset-info charset) 8)))
203 207
204(defmacro charset-iso-graphic-plane (charset) 208(defmacro charset-iso-graphic-plane (charset)
205 "Return graphic plane of CHARSET. 209 "Return graphic plane of CHARSET.
206See the function `charset-info' for more detail." 210See the function `charset-info' for more detail."
207 (if (charset-quoted-standard-p charset) 211 (if (charset-quoted-standard-p charset)
208 (aref (charset-info (nth 1 charset)) 9) 212 (aref (charset-info (nth 1 charset)) 9)
209 `(aref (charset-info ,charset) 9))) 213 (list 'aref (list 'charset-info charset) 9)))
210 214
211(defmacro charset-reverse-charset (charset) 215(defmacro charset-reverse-charset (charset)
212 "Return reverse charset of CHARSET. 216 "Return reverse charset of CHARSET.
213See the function `charset-info' for more detail." 217See the function `charset-info' for more detail."
214 (if (charset-quoted-standard-p charset) 218 (if (charset-quoted-standard-p charset)
215 (aref (charset-info (nth 1 charset)) 10) 219 (aref (charset-info (nth 1 charset)) 10)
216 `(aref (charset-info ,charset) 10))) 220 (list 'aref (list 'charset-info charset) 10)))
217 221
218(defmacro charset-short-name (charset) 222(defmacro charset-short-name (charset)
219 "Return short name of CHARSET. 223 "Return short name of CHARSET.
220See the function `charset-info' for more detail." 224See the function `charset-info' for more detail."
221 (if (charset-quoted-standard-p charset) 225 (if (charset-quoted-standard-p charset)
222 (aref (charset-info (nth 1 charset)) 11) 226 (aref (charset-info (nth 1 charset)) 11)
223 `(aref (charset-info ,charset) 11))) 227 (list 'aref (list 'charset-info charset) 11)))
224 228
225(defmacro charset-long-name (charset) 229(defmacro charset-long-name (charset)
226 "Return long name of CHARSET. 230 "Return long name of CHARSET.
227See the function `charset-info' for more detail." 231See the function `charset-info' for more detail."
228 (if (charset-quoted-standard-p charset) 232 (if (charset-quoted-standard-p charset)
229 (aref (charset-info (nth 1 charset)) 12) 233 (aref (charset-info (nth 1 charset)) 12)
230 `(aref (charset-info ,charset) 12))) 234 (list 'aref (list 'charset-info charset) 12)))
231 235
232(defmacro charset-description (charset) 236(defmacro charset-description (charset)
233 "Return description of CHARSET. 237 "Return description of CHARSET.
234See the function `charset-info' for more detail." 238See the function `charset-info' for more detail."
235 (if (charset-quoted-standard-p charset) 239 (if (charset-quoted-standard-p charset)
236 (aref (charset-info (nth 1 charset)) 13) 240 (aref (charset-info (nth 1 charset)) 13)
237 `(aref (charset-info ,charset) 13))) 241 (list 'aref (list 'charset-info charset) 13)))
238 242
239(defmacro charset-plist (charset) 243(defmacro charset-plist (charset)
240 "Return list charset property of CHARSET. 244 "Return list charset property of CHARSET.
241See the function `charset-info' for more detail." 245See the function `charset-info' for more detail."
242 (if (charset-quoted-standard-p charset) 246 (list 'aref
243 `(aref ,(charset-info (nth 1 charset)) 14) 247 (if (charset-quoted-standard-p charset)
244 `(aref (charset-info ,charset) 14))) 248 (charset-info (nth 1 charset))
249 (list 'charset-info charset))
250 14))
245 251
246(defun set-charset-plist (charset plist) 252(defun set-charset-plist (charset plist)
247 "Set CHARSET's property list to PLIST, and return PLIST." 253 "Set CHARSET's property list to PLIST, and return PLIST."