Commit 3bfa5b1f authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(make-subsidiary-coding-system): Reset

`coding-system-define-form' property of subsidiaries to nil.
Avoid duplicated entry in coding-system-alist.
(make-coding-system): Avoid duplicated entry in
coding-system-alist.
(define-coding-system-alias): Likewise.
parent 4a3d351d
......@@ -620,16 +620,16 @@ It exists just for backward compatibility, and the value is always nil.")
(subsidiaries (vector (intern (format "%s-unix" coding-system))
(intern (format "%s-dos" coding-system))
(intern (format "%s-mac" coding-system))))
(i 0)
temp)
(while (< i 3)
(put (aref subsidiaries i) 'coding-system coding-spec)
(put (aref subsidiaries i) 'eol-type i)
(add-to-coding-system-list (aref subsidiaries i))
(setq coding-system-alist
(cons (list (symbol-name (aref subsidiaries i)))
coding-system-alist))
(setq i (1+ i)))
elt)
(dotimes (i 3)
(setq elt (aref subsidiaries i))
(put elt 'coding-system coding-spec)
(put elt 'eol-type i)
(put elt 'coding-system-define-form nil)
(add-to-coding-system-list elt)
(or (assoc (symbol-name elt) coding-system-alist)
(setq coding-system-alist
(cons (list (symbol-name elt)) coding-system-alist))))
subsidiaries))
(defun transform-make-coding-system-args (name type &optional doc-string props)
......@@ -1082,8 +1082,9 @@ a value of `safe-charsets' in PLIST."
;; At last, register CODING-SYSTEM in `coding-system-list' and
;; `coding-system-alist'.
(add-to-coding-system-list coding-system)
(setq coding-system-alist (cons (list (symbol-name coding-system))
coding-system-alist))
(or (assoc (symbol-name coding-system) coding-system-alist)
(setq coding-system-alist (cons (list (symbol-name coding-system))
coding-system-alist)))
;; For a coding system of cateogory iso-8-1 and iso-8-2, create
;; XXX-with-esc variants.
......@@ -1114,8 +1115,9 @@ a value of `safe-charsets' in PLIST."
(put alias 'coding-system (coding-system-spec coding-system))
(put alias 'coding-system-define-form nil)
(add-to-coding-system-list alias)
(setq coding-system-alist (cons (list (symbol-name alias))
coding-system-alist))
(or (assoc (symbol-name alias) coding-system-alist)
(setq coding-system-alist (cons (list (symbol-name alias))
coding-system-alist)))
(let ((eol-type (coding-system-eol-type coding-system)))
(if (vectorp eol-type)
(progn
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment