Function: set-language-environment-coding-systems

set-language-environment-coding-systems is a byte-compiled function defined in mule-cmds.el.gz.

Signature

(set-language-environment-coding-systems LANGUAGE-NAME)

Documentation

Do various coding system setups for language environment LANGUAGE-NAME.

Source Code

;; Defined in /usr/src/emacs/lisp/international/mule-cmds.el.gz
(defun set-language-environment-coding-systems (language-name)
  "Do various coding system setups for language environment LANGUAGE-NAME."
  (let* ((priority (get-language-info language-name 'coding-priority))
	 (default-coding (car priority))
	 ;; If the default buffer-file-coding-system is nil, don't use
	 ;; coding-system-eol-type, because it treats nil as
	 ;; `no-conversion'.  The default buffer-file-coding-system is set
	 ;; to nil by reset-language-environment, and in that case we
	 ;; want to have here the native EOL type for each platform.
	 ;; FIXME: there should be a common code that runs both on
	 ;; startup and here to set the default EOL type correctly.
	 ;; Right now, DOS/Windows platforms set this on dos-w32.el,
	 ;; which works only as long as the order of loading files at
	 ;; dump time and calling functions at startup is not modified
	 ;; significantly, i.e. as long as this function is called
	 ;; _after_ the default buffer-file-coding-system was set by
	 ;; dos-w32.el.
	 (eol-type
          (coding-system-eol-type
           (or (default-value 'buffer-file-coding-system)
               (if (memq system-type '(windows-nt ms-dos)) 'dos 'unix)))))
    (when priority
      (set-default-coding-systems
       (if (memq eol-type '(0 1 2 unix dos mac))
	   (coding-system-change-eol-conversion default-coding eol-type)
	 default-coding))
      (setq default-sendmail-coding-system default-coding)
      (apply 'set-coding-system-priority priority))))