comparison lisp/mule/mule-cmds.el @ 4145:edb00a8b4eff

[xemacs-hg @ 2007-08-26 20:00:29 by aidan] Generally make the language environments and coding systems a little more sane.
author aidan
date Sun, 26 Aug 2007 20:00:42 +0000
parents b4f4e0cc90f1
children 0194a744d2d3
comparison
equal deleted inserted replaced
4144:4a08a9219456 4145:edb00a8b4eff
677 language-name)) 677 language-name))
678 (if current-language-environment 678 (if current-language-environment
679 (let ((func (get-language-info current-language-environment 679 (let ((func (get-language-info current-language-environment
680 'exit-function))) 680 'exit-function)))
681 (run-hooks 'exit-language-environment-hook) 681 (run-hooks 'exit-language-environment-hook)
682 (if (fboundp func) (funcall func)))) 682 (if (functionp func) (funcall func))))
683 (setq current-language-environment language-name) 683 (setq current-language-environment language-name)
684 (let ((default-eol-type (coding-system-eol-type 684 (let ((default-eol-type (coding-system-eol-type
685 default-buffer-file-coding-system))) 685 default-buffer-file-coding-system)))
686 (reset-coding-categories-to-default) 686 (reset-coding-categories-to-default)
687 (set-locale-for-language-environment language-name) 687 (set-locale-for-language-environment language-name)
755 (let ((required-features (get-language-info language-name 'features))) 755 (let ((required-features (get-language-info language-name 'features)))
756 (while required-features 756 (while required-features
757 (require (car required-features)) 757 (require (car required-features))
758 (setq required-features (cdr required-features)))) 758 (setq required-features (cdr required-features))))
759 (let ((func (get-language-info language-name 'setup-function))) 759 (let ((func (get-language-info language-name 'setup-function)))
760 (if (fboundp func) 760 (if (functionp func)
761 (funcall func))) 761 (funcall func)))
762 762
763 ;; Fit the charsets preferences in unicode conversions for the 763 ;; Fit the charsets preferences in unicode conversions for the
764 ;; language environment. 764 ;; language environment.
765 (set-language-unicode-precedence-list 765 (set-language-unicode-precedence-list
1019 ;; Init code. 1019 ;; Init code.
1020 1020
1021 ;; auto-language-alist deleted. We have a more sophisticated system, 1021 ;; auto-language-alist deleted. We have a more sophisticated system,
1022 ;; with the locales stored in the language data. 1022 ;; with the locales stored in the language data.
1023 1023
1024 ;; Initialised with an eval-when-compile in mule/general-late.el, which is 1024 ;; Initialised in mule/general-late.el, which is compiled after all the
1025 ;; compiled after all the language support--and, thus, minority Chinese 1025 ;; language support--and, thus, minority Chinese coding systems and so
1026 ;; coding systems and so on--has been loaded. 1026 ;; on--has been loaded.
1027 (defvar posix-charset-to-coding-system-hash nil 1027 (defvar posix-charset-to-coding-system-hash nil
1028 "A map from the POSIX locale charset versions of the defined coding 1028 "A map from the POSIX locale charset versions of the defined coding
1029 systems' names, with all alpha-numeric characters removed, to the actual 1029 systems' names, with all alpha-numeric characters removed, to the actual
1030 coding system names. Used at startup when working out which coding system 1030 coding system names. Used at startup when working out which coding system
1031 should be the default for the locale. ") 1031 should be the default for the locale. ")