Mercurial > emacs
comparison lisp/international/mule.el @ 73799:223a7f633c49
(make-char): Fix typo in docstring.
(load-with-code-conversion, charsetp): Doc fixes.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Mon, 06 Nov 2006 23:05:34 +0000 |
parents | 6f8deac73242 |
children | a3d2bf407246 02cf29720f31 |
comparison
equal
deleted
inserted
replaced
73798:08832c29ccc5 | 73799:223a7f633c49 |
---|---|
36 Distribution date of this version of MULE (multilingual environment).") | 36 Distribution date of this version of MULE (multilingual environment).") |
37 | 37 |
38 (defun load-with-code-conversion (fullname file &optional noerror nomessage) | 38 (defun load-with-code-conversion (fullname file &optional noerror nomessage) |
39 "Execute a file of Lisp code named FILE whose absolute name is FULLNAME. | 39 "Execute a file of Lisp code named FILE whose absolute name is FULLNAME. |
40 The file contents are decoded before evaluation if necessary. | 40 The file contents are decoded before evaluation if necessary. |
41 If optional second arg NOERROR is non-nil, | 41 If optional third arg NOERROR is non-nil, |
42 report no error if FILE doesn't exist. | 42 report no error if FILE doesn't exist. |
43 Print messages at start and end of loading unless | 43 Print messages at start and end of loading unless |
44 optional third arg NOMESSAGE is non-nil. | 44 optional fourth arg NOMESSAGE is non-nil. |
45 Return t if file exists." | 45 Return t if file exists." |
46 (if (null (file-readable-p fullname)) | 46 (if (null (file-readable-p fullname)) |
47 (and (null noerror) | 47 (and (null noerror) |
48 (signal 'file-error (list "Cannot open load file" file))) | 48 (signal 'file-error (list "Cannot open load file" file))) |
49 ;; Read file with code conversion, and then eval. | 49 ;; Read file with code conversion, and then eval. |
98 )) | 98 )) |
99 (let (kill-buffer-hook kill-buffer-query-functions) | 99 (let (kill-buffer-hook kill-buffer-query-functions) |
100 (kill-buffer buffer))) | 100 (kill-buffer buffer))) |
101 (unless purify-flag | 101 (unless purify-flag |
102 (do-after-load-evaluation fullname)) | 102 (do-after-load-evaluation fullname)) |
103 | 103 |
104 (unless (or nomessage noninteractive) | 104 (unless (or nomessage noninteractive) |
105 (if source | 105 (if source |
106 (message "Loading %s (source)...done" file) | 106 (message "Loading %s (source)...done" file) |
107 (message "Loading %s...done" file))) | 107 (message "Loading %s...done" file))) |
108 t))) | 108 t))) |
116 (let ((vector (get (car-safe (cdr obj)) 'charset))) | 116 (let ((vector (get (car-safe (cdr obj)) 'charset))) |
117 (and (vectorp vector) | 117 (and (vectorp vector) |
118 (< (aref vector 0) 160))))) | 118 (< (aref vector 0) 160))))) |
119 | 119 |
120 (defsubst charsetp (object) | 120 (defsubst charsetp (object) |
121 "T if OBJECT is a charset." | 121 "Return t if OBJECT is a charset." |
122 (and (symbolp object) (vectorp (get object 'charset)))) | 122 (and (symbolp object) (vectorp (get object 'charset)))) |
123 | 123 |
124 (defsubst charset-info (charset) | 124 (defsubst charset-info (charset) |
125 "Return a vector of information of CHARSET. | 125 "Return a vector of information of CHARSET. |
126 The elements of the vector are: | 126 The elements of the vector are: |
266 (defun make-char (charset &optional code1 code2) | 266 (defun make-char (charset &optional code1 code2) |
267 "Return a character of CHARSET whose position codes are CODE1 and CODE2. | 267 "Return a character of CHARSET whose position codes are CODE1 and CODE2. |
268 CODE1 and CODE2 are optional, but if you don't supply | 268 CODE1 and CODE2 are optional, but if you don't supply |
269 sufficient position codes, return a generic character which stands for | 269 sufficient position codes, return a generic character which stands for |
270 all characters or group of characters in the character set. | 270 all characters or group of characters in the character set. |
271 A generic character can be used to index a char table (e.g. syntax-table). | 271 A generic character can be used to index a char table (e.g. `syntax-table'). |
272 | 272 |
273 Such character sets as ascii, eight-bit-control, and eight-bit-graphic | 273 Such character sets as ascii, eight-bit-control, and eight-bit-graphic |
274 don't have corresponding generic characters. If CHARSET is one of | 274 don't have corresponding generic characters. If CHARSET is one of |
275 them and you don't supply CODE1, return the character of the smallest | 275 them and you don't supply CODE1, return the character of the smallest |
276 code in CHARSET. | 276 code in CHARSET. |
1674 If a coding system is specifed, the return value is a | 1674 If a coding system is specifed, the return value is a |
1675 cons (CODING . SOURCE), where CODING is the specified coding | 1675 cons (CODING . SOURCE), where CODING is the specified coding |
1676 system and SOURCE is a symbol `auto-coding-alist', | 1676 system and SOURCE is a symbol `auto-coding-alist', |
1677 `auto-coding-regexp-alist', `coding:', or `auto-coding-functions' | 1677 `auto-coding-regexp-alist', `coding:', or `auto-coding-functions' |
1678 indicating by what CODING is specified. Note that the validity | 1678 indicating by what CODING is specified. Note that the validity |
1679 of CODING is not checked; it's callers responsibility to check | 1679 of CODING is not checked; it's callers responsibility to check it. |
1680 it. | |
1681 | 1680 |
1682 If nothing is specified, the return value is nil." | 1681 If nothing is specified, the return value is nil." |
1683 (or (let ((coding-system (auto-coding-alist-lookup filename))) | 1682 (or (let ((coding-system (auto-coding-alist-lookup filename))) |
1684 (if coding-system | 1683 (if coding-system |
1685 (cons coding-system 'auto-coding-alist))) | 1684 (cons coding-system 'auto-coding-alist))) |
1696 coding-system head-found tail-found pos char-trans) | 1695 coding-system head-found tail-found pos char-trans) |
1697 ;; Try a short cut by searching for the string "coding:" | 1696 ;; Try a short cut by searching for the string "coding:" |
1698 ;; and for "unibyte:" at the head and tail of SIZE bytes. | 1697 ;; and for "unibyte:" at the head and tail of SIZE bytes. |
1699 (setq head-found (or (search-forward "coding:" head-end t) | 1698 (setq head-found (or (search-forward "coding:" head-end t) |
1700 (search-forward "unibyte:" head-end t) | 1699 (search-forward "unibyte:" head-end t) |
1701 (search-forward "enable-character-translation:" | 1700 (search-forward "enable-character-translation:" |
1702 head-end t))) | 1701 head-end t))) |
1703 (if (and head-found (> head-found tail-start)) | 1702 (if (and head-found (> head-found tail-start)) |
1704 ;; Head and tail are overlapped. | 1703 ;; Head and tail are overlapped. |
1705 (setq tail-found head-found) | 1704 (setq tail-found head-found) |
1706 (goto-char tail-start) | 1705 (goto-char tail-start) |