aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1997-09-25 12:26:38 +0000
committerKenichi Handa1997-09-25 12:26:38 +0000
commitd3675a42d8d9dde537e7482b4dbcb465c6c5ddf0 (patch)
tree1a42c7060aa8b3cc290535a51bc552452944ebd8
parentbd5d4159b7597a2d683aa801c080584e212627e8 (diff)
downloademacs-d3675a42d8d9dde537e7482b4dbcb465c6c5ddf0.tar.gz
emacs-d3675a42d8d9dde537e7482b4dbcb465c6c5ddf0.zip
(charset-list): Change it to function.
Make it obsolete. (make-coding-system): Put `coding-system-parent' property to a coding system just made. (coding-spec-plist-idx): New variable.
-rw-r--r--lisp/international/mule.el24
1 files changed, 15 insertions, 9 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 9eeeb30d659..7bcdc8ea75e 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -230,12 +230,15 @@ A generic character can be used to index a char table (e.g. syntax-table)."
230 `(make-char-internal ,(charset-id (nth 1 charset)) ,c1 ,c2) 230 `(make-char-internal ,(charset-id (nth 1 charset)) ,c1 ,c2)
231 `(make-char-internal (charset-id ,charset) ,c1 ,c2))) 231 `(make-char-internal (charset-id ,charset) ,c1 ,c2)))
232 232
233(defmacro charset-list () 233(defun charset-list ()
234 "Return list of charsets ever defined. 234 "Return list of charsets ever defined.
235 235
236This macro is provided for backward compatibility. 236This function is provided for backward compatibility.
237Now we have the variable `charset-list'." 237Now we have the variable `charset-list'."
238 'charset-list) 238 charset-list)
239
240(make-obsolete 'charset-list
241 "Use the variable charset-list instead.")
239 242
240(defsubst generic-char-p (char) 243(defsubst generic-char-p (char)
241 "Return t if and only if CHAR is a generic character. 244 "Return t if and only if CHAR is a generic character.
@@ -250,19 +253,17 @@ See also the documentation of make-char."
250;; 253;;
251;; The value of the property `coding-system' is a vector of the 254;; The value of the property `coding-system' is a vector of the
252;; following format: 255;; following format:
253;; [TYPE MNEMONIC DOC-STRING NOT-USED-NOW FLAGS] 256;; [TYPE MNEMONIC DOC-STRING PLIST FLAGS]
254;; We call this vector as coding-spec. See comments in src/coding.c 257;; We call this vector as coding-spec. See comments in src/coding.c
255;; for more detail. The property value may be another coding system, 258;; for more detail.
256;; in which case, the coding-spec should be taken from that
257;; coding-system. The 4th element NOT-USED-NOW is kept just for
258;; backward compatibility with old version of Mule.
259 259
260(defconst coding-spec-type-idx 0) 260(defconst coding-spec-type-idx 0)
261(defconst coding-spec-mnemonic-idx 1) 261(defconst coding-spec-mnemonic-idx 1)
262(defconst coding-spec-doc-string-idx 2) 262(defconst coding-spec-doc-string-idx 2)
263(defconst coding-spec-plist-idx 2)
263(defconst coding-spec-flags-idx 4) 264(defconst coding-spec-flags-idx 4)
264 265
265;; Coding system may have proerpty `eol-type'. The value of the 266;; Coding system may have property `eol-type'. The value of the
266;; property `eol-type' is integer 0..2 or a vector of three coding 267;; property `eol-type' is integer 0..2 or a vector of three coding
267;; systems. The integer value 0, 1, and 2 indicate the format of 268;; systems. The integer value 0, 1, and 2 indicate the format of
268;; end-of-line LF, CRLF, and CR respectively. The vector value 269;; end-of-line LF, CRLF, and CR respectively. The vector value
@@ -306,6 +307,10 @@ See also the documentation of make-char."
306 "Return DOC-STRING element in coding-spec of CODING-SYSTEM." 307 "Return DOC-STRING element in coding-spec of CODING-SYSTEM."
307 (coding-system-spec-ref coding-system coding-spec-doc-string-idx)) 308 (coding-system-spec-ref coding-system coding-spec-doc-string-idx))
308 309
310(defun coding-system-plist (coding-system)
311 "Return PLIST element in coding-spec of CODING-SYSTEM."
312 (coding-system-spec-ref coding-system coding-spec-plist-idx))
313
309(defun coding-system-flags (coding-system) 314(defun coding-system-flags (coding-system)
310 "Return FLAGS element in coding-spec of CODING-SYSTEM." 315 "Return FLAGS element in coding-spec of CODING-SYSTEM."
311 (coding-system-spec-ref coding-system coding-spec-flags-idx)) 316 (coding-system-spec-ref coding-system coding-spec-flags-idx))
@@ -469,6 +474,7 @@ FLAGS specifies more precise information of each TYPE.
469 (t ; i.e. (= type 5) 474 (t ; i.e. (= type 5)
470 (setq coding-category 'coding-category-raw-text))) 475 (setq coding-category 'coding-category-raw-text)))
471 (put coding-system 'coding-system coding-spec) 476 (put coding-system 'coding-system coding-spec)
477 (put coding-system 'coding-system-parent coding-system)
472 (put coding-system 'coding-category coding-category) 478 (put coding-system 'coding-category coding-category)
473 (put coding-category 'coding-systems 479 (put coding-category 'coding-systems
474 (cons coding-system (get coding-category 'coding-systems)))) 480 (cons coding-system (get coding-category 'coding-systems))))