• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/international/

Lines Matching +defs:char +defs:charset

112 (defsubst charset-quoted-standard-p (obj)
113 "Return t if OBJ is a quoted symbol, and is the name of a standard charset."
116 (let ((vector (get (car-safe (cdr obj)) 'charset)))
121 "Return t if OBJECT is a charset."
122 (and (symbolp object) (vectorp (get object 'charset))))
124 (defsubst charset-info (charset)
133 CHARSET-ID (integer) is the identification number of the charset.
135 the charset: one of 1, 2, 3, and 4.
137 the charset: 1 or 2.
139 WIDTH (integer) is the number of columns a character in the charset
142 charset when rendering. If 0, render from left to right, else
145 charset.
147 charset. All charsets of less than 0xA0 has the value 0.
149 corresponding ISO 2022 charset. If the charset is not assigned
154 If the charset is not assigned any final character, the value is -1.
155 REVERSE-CHARSET (integer) is the charset which differs only in
156 LEFT-TO-RIGHT value from the charset. If there's no such a
157 charset, the value is -1.
158 SHORT-NAME (string) is the short name to refer to the charset.
159 LONG-NAME (string) is the long name to refer to the charset
160 DESCRIPTION (string) is the description string of the charset.
162 want to put and get by functions `put-charset-property' and
163 `get-charset-property' respectively."
164 (get charset 'charset))
170 (defmacro charset-id (charset)
171 "Return charset identification number of CHARSET."
172 (if (charset-quoted-standard-p charset)
173 (aref (charset-info (nth 1 charset)) 0)
174 (list 'aref (list 'charset-info charset) 0)))
176 (defmacro charset-bytes (charset)
178 See the function `charset-info' for more detail."
179 (if (charset-quoted-standard-p charset)
180 (aref (charset-info (nth 1 charset)) 1)
181 (list 'aref (list 'charset-info charset) 1)))
183 (defmacro charset-dimension (charset)
185 See the function `charset-info' for more detail."
186 (if (charset-quoted-standard-p charset)
187 (aref (charset-info (nth 1 charset)) 2)
188 (list 'aref (list 'charset-info charset) 2)))
190 (defmacro charset-chars (charset)
192 See the function `charset-info' for more detail."
193 (if (charset-quoted-standard-p charset)
194 (aref (charset-info (nth 1 charset)) 3)
195 (list 'aref (list 'charset-info charset) 3)))
197 (defmacro charset-width (charset)
199 See the function `charset-info' for more detail."
200 (if (charset-quoted-standard-p charset)
201 (aref (charset-info (nth 1 charset)) 4)
202 (list 'aref (list 'charset-info charset) 4)))
204 (defmacro charset-direction (charset)
206 See the function `charset-info' for more detail."
207 (if (charset-quoted-standard-p charset)
208 (aref (charset-info (nth 1 charset)) 5)
209 (list 'aref (list 'charset-info charset) 5)))
211 (defmacro charset-iso-final-char (charset)
212 "Return final char of CHARSET.
213 See the function `charset-info' for more detail."
214 (if (charset-quoted-standard-p charset)
215 (aref (charset-info (nth 1 charset)) 8)
216 (list 'aref (list 'charset-info charset) 8)))
218 (defmacro charset-iso-graphic-plane (charset)
220 See the function `charset-info' for more detail."
221 (if (charset-quoted-standard-p charset)
222 (aref (charset-info (nth 1 charset)) 9)
223 (list 'aref (list 'charset-info charset) 9)))
225 (defmacro charset-reverse-charset (charset)
226 "Return reverse charset of CHARSET.
227 See the function `charset-info' for more detail."
228 (if (charset-quoted-standard-p charset)
229 (aref (charset-info (nth 1 charset)) 10)
230 (list 'aref (list 'charset-info charset) 10)))
232 (defmacro charset-short-name (charset)
234 See the function `charset-info' for more detail."
235 (if (charset-quoted-standard-p charset)
236 (aref (charset-info (nth 1 charset)) 11)
237 (list 'aref (list 'charset-info charset) 11)))
239 (defmacro charset-long-name (charset)
241 See the function `charset-info' for more detail."
242 (if (charset-quoted-standard-p charset)
243 (aref (charset-info (nth 1 charset)) 12)
244 (list 'aref (list 'charset-info charset) 12)))
246 (defmacro charset-description (charset)
248 See the function `charset-info' for more detail."
249 (if (charset-quoted-standard-p charset)
250 (aref (charset-info (nth 1 charset)) 13)
251 (list 'aref (list 'charset-info charset) 13)))
253 (defmacro charset-plist (charset)
254 "Return list charset property of CHARSET.
255 See the function `charset-info' for more detail."
257 (if (charset-quoted-standard-p charset)
258 (charset-info (nth 1 charset))
259 (list 'charset-info charset))
262 (defun set-charset-plist (charset plist)
264 (aset (charset-info charset) 14 plist))
266 (defun make-char (charset &optional code1 code2)
271 A generic character can be used to index a char table (e.g. `syntax-table').
282 would need to index the corresponding Emacs charset."
283 (make-char-internal (charset-id charset) code1 code2))
285 (put 'make-char 'byte-compile
287 (let ((charset (nth 1 form)))
289 (cons 'make-char-internal
290 (cons (if (charset-quoted-standard-p charset)
291 (charset-id (nth 1 charset))
292 (list 'charset-id charset))
295 (defun charset-list ()
299 Now we have the variable `charset-list'."
300 charset-list)
302 (defsubst generic-char-p (char)
304 See also the documentation of `make-char'."
305 (and (>= char 0400)
306 (let ((l (split-char char)))
310 (defun decode-char (ccs code-point &optional restriction)
330 (make-char 'latin-iso8859-1 code-point))
333 (make-char 'mule-unicode-0100-24ff
337 (make-char 'mule-unicode-2500-33ff
341 (make-char 'mule-unicode-e000-ffff
349 (defun encode-char (char ccs &optional restriction)
366 (let* ((split (split-char char))
367 (charset (car split))
371 (utf-lookup-subst-table-for-encode char))
374 (setq trans (aref table char))
376 (setq split (split-char trans)
377 charset (car split)))
378 (cond ((eq charset 'ascii)
379 (or trans char))
380 ((eq charset 'latin-iso8859-1)
382 ((eq charset 'mule-unicode-0100-24ff)
385 ((eq charset 'mule-unicode-2500-33ff)
388 ((eq charset 'mule-unicode-e000-ffff)
391 ((eq charset 'eight-bit-control)
392 char))))))))
403 (up (char-table-extra-slot (standard-case-table) 0)))
404 (if up (set-char-table-extra-slot tbl 0 (copy-sequence up)))
405 (set-char-table-extra-slot tbl 1 nil)
406 (set-char-table-extra-slot tbl 2 nil)
454 ;; o mime-charset
544 (char-to-string val))))
608 (defun map-charset-chars (func charset)
612 (let* ((dim (charset-dimension charset))
613 (chars (charset-chars charset))
619 (make-char charset start)
620 (make-char charset (+ start chars -1)))
623 (make-char charset (+ i start) start)
624 (make-char charset (+ i start) (+ start chars -1)))))))
626 (defalias 'register-char-codings 'ignore "")
627 (make-obsolete 'register-char-codings
631 (defconst char-coding-system-table nil
657 (let ((mnemonic (string-to-char (or (plist-get props 'mnemonic) "?")))
675 (let ((g0 (plist-get props 'charset-g0))
676 (g1 (plist-get props 'charset-g1))
677 (g2 (plist-get props 'charset-g2))
678 (g3 (plist-get props 'charset-g3))
682 (plist-get props 'input-charset-conversion)))
685 (plist-get props 'output-charset-conversion)))
690 (plist-get props 'input-charset-conversion)))
693 (plist-get props 'output-charset-conversion)))
829 The value is a char table. If a character has non-nil value in it,
837 supported. Even if some charset is not in this list, it doesn't
838 mean that the charset can't be encoded in the coding system;
840 in the coding system won't be able to handle that charset.
842 o mime-charset
844 The value is a symbol whose name is the `MIME-charset' parameter of
849 A non-nil value means the `mime-charset' property names a charset
942 (let ((charset (car fl)))
945 (or (charsetp charset)
946 (and (consp charset)
947 (charsetp (car charset)))))
949 (if (charsetp charset)
950 (if (= i 1) (setq g1-designation charset))
951 (if (consp charset)
952 (let ((tail charset)
959 (error "Invalid charset: %s" elt)))
961 (setq g1-designation (car charset)))
962 (if charset
963 (if (eq charset t)
965 (error "Invalid charset: %s" charset)))))
966 (aset vec i charset))
989 (= (charset-dimension g1-designation) 2))
1027 ;; If only safe-charsets is specified, make a char-table from
1028 ;; it, and store that char-table as the value of `safe-chars'.
1030 (let (charset)
1033 (setq safe-chars (make-char-table 'safe-chars))
1035 (setq charset (car safe-charsets)
1037 (cond ((eq charset 'ascii)) ; just ignore
1038 ((eq charset 'eight-bit-control)
1043 ((eq charset 'eight-bit-graphic)
1049 (aset safe-chars (make-char charset) t))))
1115 (mime-charset (assq 'mime-charset properties)))
1119 (if mime-charset
1120 (setcdr mime-charset nil))
1129 (put 'safe-chars 'char-table-extra-slots 0)
1405 be a char-table, in which case characters that have non-nil value
1406 in the char-table are the target.
1452 (let* ((M (char-after (+ pos 4)))
1453 (L (char-after (+ pos 5)))
1467 (forward-char bytes)
1470 (delete-char -3)
1473 (goto-char (point-min))
1476 ;; Return a char table of extended segment usage for each character.
1477 ;; Each value of the char table is nil, one of the elements of
1481 (let ((table (make-char-table 'translation-table)))
1482 (aset table (make-char 'mule-unicode-0100-24ff) 'utf-8)
1483 (aset table (make-char 'mule-unicode-2500-33ff) 'utf-8)
1484 (aset table (make-char 'mule-unicode-e000-ffff) 'utf-8)
1491 (charset (nth 3 slot)))
1492 (if charset
1493 (cond ((charsetp charset)
1494 (aset table (make-char charset) slot))
1495 ((listp charset)
1496 (dolist (elt charset)
1497 (aset table (make-char elt) slot)))
1498 ((char-table-p charset)
1499 (map-char-table #'(lambda (k v)
1501 charset))))))
1531 (goto-char (setq last-pos (point-min)))
1536 last-encoding-info (aref encoding-table (char-after last-pos)))
1538 (goto-char (1+ last-pos))
1543 (aref encoding-table (following-char))))
1556 (goto-char last-pos)
1568 (goto-char last-pos)
1574 (forward-char 1)
1577 (goto-char (point-min))))
1627 (goto-char from)
1714 coding-system head-found tail-found pos char-trans)
1724 (goto-char tail-start)
1732 (goto-char head-start)
1736 (goto-char head-start)
1750 (setq char-trans (match-string 2)))))
1755 (when (and tail-found (or (not coding-system) (not char-trans)))
1756 (goto-char tail-start)
1778 (re-char-trans
1787 (forward-char -1) ; skip back \r or \n.
1790 (goto-char pos)
1797 (when (and (not char-trans)
1798 (re-search-forward re-char-trans tail-end t))
1799 (setq char-trans (match-string 1))))))
1802 ;; set char-trans to "nil".
1806 char-trans "nil"))))
1807 (when (and char-trans
1808 (not (setq char-trans (intern char-trans))))
1819 (goto-char (point-min))
2034 (goto-char (point-min))
2082 A translation table is a char table intended for character
2088 FROM can be a generic character (see `make-char'). In this case, TO is
2097 (let ((table (make-char-table 'translation-table))
2104 (from-rev (nreverse (split-char from)))
2107 (to-rev (nreverse (split-char to))))
2121 (or (> to-i 0) (not (generic-char-p to-alt))))
2124 (set-char-table-default table from to)
2151 (let ((table (make-char-table 'translation-table))
2152 (rev-table (make-char-table 'translation-table))
2160 (set-char-table-extra-slot table 0 rev-table)
2168 If the first element of ARGS is a char-table whose purpose is
2179 (let ((table (if (and (char-table-p (car args))
2180 (eq (char-table-subtype (car args))
2204 TABLE is a string or a char-table.
2207 If TABLE is a char-table, the element for character N is the mapping
2225 (or (char-table-p val)
2277 (put 'use-default-ascent 'char-table-extra-slots 0)
2278 (setq use-default-ascent (make-char-table 'use-default-ascent))
2279 (put 'ignore-relative-composition 'char-table-extra-slots 0)
2281 (make-char-table 'ignore-relative-composition))
2319 (re-search-forward "<meta\\s-+http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']text/\\sw+;\\s-*charset=\\(.+?\\)[\"']" size t))