;ELC ;;; Compiled by heimdall@baldur on Fri Feb 1 18:34:49 2008 ;;; from file /home/heimdall/repos/emms/emms-i18n.el ;;; in Emacs version 23.0.60.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`emms-i18n.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (provide 'emms-i18n) #@127 If the `emms-i18n-coding-dectect-functions' return coding system in this list, use `emms-i18n-default-coding-system' instead. (defvar emms-i18n-nerver-used-coding-system '(raw-text undecided) (#$ . 603)) #@46 If coding detect failed, use this for decode (defvar emms-i18n-coding-system-for-read 'utf-8 (#$ . 813)) #@40 If non-nil, used for decode and encode (defvar emms-i18n-default-coding-system nil (#$ . 924)) #@46 A list of function to call to detect codings (defvar emms-i18n-coding-dectect-functions nil (#$ . 1025)) #@64 Max bytes to detect coding system. Nil mean scan whole buffer. (defvar emms-i18n-detect-max-size 10000 (#$ . 1136)) #@44 Convert STR from FROM coding to TO coding. (defalias 'emms-i18n-iconv #[(from to str) "\203 \203\303\304\n \"\"\207\n\207" [from to str decode-coding-string encode-coding-string] 4 (#$ . 1258)]) (defalias 'emms-i18n-iconv-region #[(beg end from to) "\205 \205\214\n }\210\304ed #\210\305ed#)\207" [from to beg end encode-coding-region decode-coding-region] 4]) (defalias 'emms-i18n-iconv-buffer #[(from to &optional buf) "\212\203q\210\303ed \n$)\207" [buf from to emms-i18n-iconv-region] 5]) #@39 Set `emms-i18n-default-coding-system' (defalias 'emms-i18n-set-default-coding-system #[(read-coding write-coding) "\304!\205\304 !\205 B\305\n@\203\306\307\n@\"\202\310\306\311\nA\206( A\"P!\207" [read-coding write-coding emms-i18n-default-coding-system default-process-coding-system coding-system-p message format "The coding system for read is %S." "Good, you want detect coding system by me!" " The coding system for write is %S."] 5 (#$ . 1773) "zSet coding system for read: \nzSet coding system for write: "]) #@710 This function run program and return the program result. If the CAR part of `emms-i18n-default-coding-system' is non-nil, the program result will be decode use the CAR part of emms-i18n-default-coding-system. Otherwise, use `emms-i18n-coding-dectect-functions' to detect the coding system of the result. If the emms-i18n-coding-dectect-functions failed, use `emms-i18n-detect-coding-function' to detect coding system. If all the coding system is nil or in `emms-i18n-nerver-used-coding-system', decode the result using `emms-i18n-coding-system-for-read'. The rest arguments ARGS is as the same as `call-process', except the BUFFER should always have value t. Otherwise the coding detection will not perform. (defalias 'emms-i18n-call-process-simple #[(&rest args) "\306!\307\211\211\310\f8\311=\203 @\240\210`\312\313\f\"\310\f8\311=\2038 @\2048\214 `}\210\314ed\315 #\210)\n,\207" [default-process-coding-system pos exit process-coding-system-alist args emms-i18n-default-coding-system copy-tree nil 2 t apply call-process decode-coding-region emms-i18n-detect-buffer-coding-system] 4 (#$ . 2307)]) #@243 Run the program like `call-process'. If the cdr part `emms-i18n-default-coding-system' is non-nil, the string in ARGS will be encode by the CDR part of `emms-i18n-default-coding-system', otherwise, it is pass all parameter to `call-process'. (defalias 'emms-i18n-call-process #[(&rest args) "\305\306!\307\216rq\210 A\203 \310\311\312\f\"*\202\311\312\f\"+\207" [#1=#:temp-buffer emms-i18n-default-coding-system process-coding-system-alist default-process-coding-system args generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#1# buffer-name kill-buffer] 2)) nil apply call-process] 3 (#$ . 3427)]) (defalias 'emms-i18n-detect-coding-function #[(size) "\302`\204\n \202 ^`\\\303#\207" [emms-i18n-detect-max-size size detect-coding-region t] 4]) #@60 Before call this function, make sure the buffer is literal (defalias 'emms-i18n-detect-buffer-coding-system #[(&optional buf) "deZ\306\307\"\310\212\f\203\fq\210eb\210 \311V\203-\312\302 \"\313 ! \235\203-\307 ! \2039\313 ! \235\203>\f\202? ,\207" [emms-i18n-coding-dectect-functions coding func size buf emms-i18n-nerver-used-coding-system append emms-i18n-detect-coding-function nil 0 run-hook-with-args-until-success coding-system-base emms-i18n-coding-system-for-read] 4 (#$ . 4217)])