;ELC ;;; Compiled ;;; in Emacs version 27.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@78 Embed OBJ (string or character) at index IDX of STRING. (fn STRING IDX OBJ) (defalias 'store-substring #[771 "\211\250\203 I\210\202(\211G\300\211W\203&\\HI\210\211T\262\202\266\207" [0] 9 (#$ . 408)]) #@115 String to use to indicate truncation. Serves as default value of ELLIPSIS argument to `truncate-string-to-width'. (defvar truncate-string-ellipsis "..." (#$ . 635)) #@1405 Truncate string STR to end at column END-COLUMN. The optional 3rd arg START-COLUMN, if non-nil, specifies the starting column; that means to return the characters occupying columns START-COLUMN ... END-COLUMN of STR. Both END-COLUMN and START-COLUMN are specified in terms of character display width in the current buffer; see also `char-width'. The optional 4th arg PADDING, if non-nil, specifies a padding character (which should have a display width of 1) to add at the end of the result if STR doesn't reach column END-COLUMN, or if END-COLUMN comes in the middle of a character in STR. PADDING is also added at the beginning of the result if column START-COLUMN appears in the middle of a character in STR. If PADDING is nil, no padding is added in these cases, so the resulting string may be narrower than END-COLUMN. If ELLIPSIS is non-nil, it should be a string which will replace the end of STR (including any padding) if it extends beyond END-COLUMN, unless the display width of STR is equal to or less than the display width of ELLIPSIS. If it is non-nil and not a string, then ELLIPSIS defaults to `truncate-string-ellipsis'. If ELLIPSIS-TEXT-PROPERTY is non-nil, a too-long string will not be truncated, but instead the elided parts will be covered by a `display' text property showing the ellipsis. (fn STR END-COLUMN &optional START-COLUMN PADDING ELLIPSIS ELLIPSIS-TEXT-PROPERTY) (defalias 'truncate-string-to-width #[1538 "\204\301\262\203;\204\262G\302!\203#\302!\202$\301\301\211\303\211\304\211\211\211\3051SW\205OH\262\306!\\\262T\262\20200\202Y\210\n\211\262 \210W\203t \203p\307\"\202J\303\202J \203\214V\203\214\307Z\"\262\262Y\203\nW\203\262  V\203\262 Z\262\202\265\303\262 \3101\344W\205\340\262\262H\262\306!\\\262T\262\202\2710\202\352\210\n\211\262 \210V\203\371\262\262 \203W\203\307Z\"\262 \203=\f\303\232\204=\203=\311 #\312\311\f\"\313\2068\303#Q\202J\311 #R\207" [truncate-string-ellipsis 0 string-width "" nil (args-out-of-range) char-width make-string (args-out-of-range) substring propertize display] 23 (#$ . 808)]) #@390 Return t if OBJ is a nested alist. Nested alist is a list of the form (ENTRY . BRANCHES), where ENTRY is any Lisp object, and BRANCHES is a list of cons cells of the form (KEY-ELEMENT . NESTED-ALIST). You can use a nested alist to store any Lisp object (ENTRY) for a key sequence KEYSEQ, where KEYSEQ is a sequence of KEY-ELEMENT. KEYSEQ can be a string, a vector, or a list. (fn OBJ) (defalias 'nested-alist-p #[257 "\211\205\f\211<\205\f\211A<\207" [] 2 (#$ . 3046)]) (put 'nested-alist-p 'byte-optimizer 'byte-compile-inline-expand) #@326 Set ENTRY for KEYSEQ in a nested alist ALIST. Optional 4th arg LEN non-nil means the first LEN elements in KEYSEQ are considered. Optional 5th argument BRANCHES if non-nil is branches for a keyseq longer than KEYSEQ. See the documentation of `nested-alist-p' for more detail. (fn KEYSEQ ENTRY ALIST &optional LEN BRANCHES) (defalias 'set-nested-alist #[1283 "\211\205 \211<\205 \211A<\262\204\300\301\"\210\206G\302;\203k\211W\203\211\2057\211<\2057\211A<\262\204B\300\303\"\210H\211A\236\211\204^\304D\262\211AB\241\266\211A\262\266\211T\262\202$\305!\203\272\211W\203\211\205\205\211<\205\205\211A<\262\204\220\300\303\"\210H\306A\"\211\204\255\304D\262\211AB\241\266\211A\262\266\211T\262\202r<\203 \211W\203\211\205\323\211<\205\323\211A<\262\204\336\300\303\"\210\211A\262\242\306A\"\211\204\376\304D\262\211AB\241\266\211A\262\266\211T\262\202\300\307\310C\"\210\240\210\205 \311!\241\207" [error "Invalid argument %s" 0 "Keyseq %s is too long for this nested alist" t arrayp assoc signal wrong-type-argument last] 13 (#$ . 3595)]) #@588 Look up key sequence KEYSEQ in nested alist ALIST. Return the definition. Optional 3rd argument LEN specifies the length of KEYSEQ. Optional 4th argument START specifies index of the starting key. The returned value is normally a nested alist of which car part is the entry for KEYSEQ. If ALIST is not deep enough for KEYSEQ, return number which is how many key elements at the front of KEYSEQ it takes to reach a leaf in ALIST. Optional 5th argument NIL-FOR-TOO-LONG non-nil means return nil even if ALIST is not deep enough. (fn KEYSEQ ALIST &optional LEN START NIL-FOR-TOO-LONG) (defalias 'lookup-nested-alist #[1282 "\211\205 \211<\205 \211A<\262\204\300\301\"\210\204G\262\206$\302\3032\265;\203O\211W\205\264HA\236A\211\262\203G\211T\262\202-\304\303\305\"\210\202-\306!\203{\211W\205\264\307HA\"A\211\262\203s\211T\262\202V\304\303\305\"\210\202V<\203\256\211\233\262\211W\205\264\307\211A\262\242A\"A\211\262\203\246\211T\262\202\206\304\303\305\"\210\202\206\310\311C\"0\203\301?\205\302\211\202\302\207" [error "Invalid argument %s" 0 lookup-nested-alist-tag throw t arrayp assoc signal wrong-type-argument] 9 (#$ . 4754)]) #@90 Return the value of CODING-SYSTEM's `post-read-conversion' property. (fn CODING-SYSTEM) (defalias 'coding-system-post-read-conversion #[257 "\300\301\"\207" [coding-system-get :post-read-conversion] 4 (#$ . 5965)]) #@90 Return the value of CODING-SYSTEM's `pre-write-conversion' property. (fn CODING-SYSTEM) (defalias 'coding-system-pre-write-conversion #[257 "\300\301\"\207" [coding-system-get :pre-write-conversion] 4 (#$ . 6188)]) #@94 Return the value of CODING-SYSTEM's `decode-translation-table' property. (fn CODING-SYSTEM) (defalias 'coding-system-translation-table-for-decode #[257 "\300\301\"\207" [coding-system-get :decode-translation-table] 4 (#$ . 6411)]) #@94 Return the value of CODING-SYSTEM's `encode-translation-table' property. (fn CODING-SYSTEM) (defalias 'coding-system-translation-table-for-encode #[257 "\300\301\"\207" [coding-system-get :encode-translation-table] 4 (#$ . 6650)]) #@311 Execute BODY like `progn' with CODING-SYSTEMS at the front of priority list. CODING-SYSTEMS is a list of coding systems. See `set-coding-system-priority'. This affects the implicit sorting of lists of coding systems returned by operations such as `find-coding-systems-region'. (fn CODING-SYSTEMS &rest BODY) (defalias 'with-coding-priority '(macro . #[385 "\300\301!\302\303BC\304\305E\306\307B\304\310EEF\207" [make-symbol "current" let ((coding-system-priority-list)) apply #'set-coding-system-priority unwind-protect progn #'set-coding-system-priority] 11 (#$ . 6890)])) (put 'with-coding-priority 'edebug-form-spec t) #@208 Detect a coding system of the text between FROM and TO with PRIORITY-LIST. PRIORITY-LIST is an alist of coding categories vs the corresponding coding systems ordered by priority. (fn FROM TO PRIORITY-LIST) (defalias 'detect-coding-with-priority '(macro . #[771 "\300\301\302E\303EE\207" [with-coding-priority mapcar #'cdr detect-coding-region] 8 (#$ . 7528)])) (make-obsolete 'detect-coding-with-priority 'with-coding-priority "23.1") #@196 Detect a coding system for the text between FROM and TO with LANG-ENV. The detection takes into account the coding system priorities for the language environment LANG-ENV. (fn FROM TO LANG-ENV) (defalias 'detect-coding-with-language-environment #[771 "\300\301\"\211\205\"\302 \303\304\"\210\305\306\307\310\311!\312\"\313$\216\314\")\262\207" [get-language-info coding-priority coding-system-priority-list apply set-coding-system-priority make-byte-code 0 "\301\302\300\"\207" vconcat vector [apply set-coding-system-priority] 3 detect-coding-region] 11 (#$ . 7974)]) #@15 (fn BYTE F) (defalias 'filepos-to-bufferpos--dos #[514 "\300\211\301\211\211Z!\262\204\"X\203e\262\202\"d\262\302!S\262\211U\204^\2038V\203^\211V\203R\203IS^\202J\211\262\262\202T]\262\262\202\207" [0 nil line-number-at-pos] 10 (#$ . 8557)]) #@580 Try to return the buffer position corresponding to a particular file position. The file position is given as a (0-based) BYTE count. The function presumes the file is encoded with CODING-SYSTEM, which defaults to `buffer-file-coding-system'. QUALITY can be: `approximate', in which case we may cut some corners to avoid excessive work. `exact', in which case we may end up re-(en/de)coding a large part of the file/buffer, this can be expensive and slow. nil, in which case we may return nil rather than an approximation. (fn BYTE &optional QUALITY CODING-SYSTEM) (defalias 'filepos-to-bufferpos #[769 "\211CC\242\204 \240\210\301\242!\302\242!\303\242!\214~\210e)\304=\2030\305\242\306\"\2030\307\262\310>\203?\311>\204?\312\262\313\314\267\202\215\305\242\315\"\203Y\316\242\317Z]\240\210\320U\203j\321\242\\\322\"\2028\322\242\\!\2028\320U\203\205\321\242\\\323\"\2028\242\\\2028\324=\204\237\211\n $\2028\325=\204\331\305\242\315\"\203\271\316\242\326Z]\240\210\211\242\326\245\240\210\320U\203\321\321\242\\\323\"\2028\242\\\2028\327\267\2027\322\242\\!\2028p\330\331!r\211q\210\332\316\333\334\335!\336\"\326$\216\337\340!\210prq\210\214~\210\341d\f\242\\^\f\242$\210*\342ed \242\\^ \242\343$G\\\262*\262\262\2028\340\262\266\204\207" [buffer-file-coding-system coding-system-eol-type coding-system-type coding-system-base utf-8 coding-system-get :post-read-conversion not-utf-8 (charset raw-text undecided) (chinese-gbk chinese-gb18030 euc-tw euc-jis-2004 korean-iso-8bit chinese-iso-8bit japanese-iso-8bit chinese-big5-hkscs japanese-cp932 korean-cp949) single-byte #[1028 "\300\267\202V\301\242\\!\207p\302\303!r\211q\210\304\305\306\307\310!\311\"\312$\216\313\314!\210prq\210\214~\210\315d\n\242\\^\242$\210*\316ed \242\\^\242\317$G\\\262*\262\207\314\207" [#s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (approximate 6 exact 13)) byte-to-position generate-new-buffer #1=" *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 set-buffer-multibyte nil encode-coding-region decode-coding-region t] 13 "\n\n(fn BYTE QUALITY CODING-SYSTEM PM)"] #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (utf-8 70 single-byte 116)) :bom 0 3 1 filepos-to-bufferpos--dos byte-to-position identity utf-16 exact 2 #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (approximate 224 exact 234)) generate-new-buffer #1# make-byte-code "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] set-buffer-multibyte nil encode-coding-region decode-coding-region t] 19 (#$ . 8853)]) #@586 Try to return the file byte corresponding to a particular buffer POSITION. Value is the file position given as a (0-based) byte count. The function presumes the file is encoded with CODING-SYSTEM, which defaults to `buffer-file-coding-system'. QUALITY can be: `approximate', in which case we may cut some corners to avoid excessive work. `exact', in which case we may end up re-(en/de)coding a large part of the file/buffer, this can be expensive and slow. nil, in which case we may return nil rather than an approximation. (fn POSITION &optional QUALITY CODING-SYSTEM) (defalias 'bufferpos-to-filepos #[769 "\211C\211\242\204 \211\240\210\301\242!\211\302U\203\303!S\202\304\305\242!\306\242!\302\307=\2038\310\242\311\"\2038\312\262\313>\203G\314>\204G\315\262\316\317\267\202\205\320\321 !\206d\n\304X\203a\202d\321d!\310 \242\322\"\203q\323\202r\304[$\202\n\320\n[#\202\n\324=\204\232\211\n\n %\202\n\325=\204\274\320\nZ\326_\310 \242\322\"\203\265\326\202\266\304#\202\n\327\267\202 \320\321 ![#\202\np\330\331!r\211q\210\332\304\333\334\335!\336\"\326$\216\337\340!\210prq\210\214~\210\341ed^\f\242$\210*\342 \262*\262\262\202\n\340\262\266\205\207" [buffer-file-coding-system coding-system-eol-type 1 line-number-at-pos 0 coding-system-type coding-system-base utf-8 coding-system-get :post-read-conversion not-utf-8 (charset raw-text undecided) (chinese-gbk chinese-gb18030 euc-tw euc-jis-2004 korean-iso-8bit chinese-iso-8bit japanese-iso-8bit chinese-big5-hkscs japanese-cp932 korean-cp949) single-byte #[1285 "\300\267\202E\301\302![#\207p\303\304!r\211q\210\305\306\307\310\311!\312\"\313$\216\314\315!\210prq\210\214~\210\316ed\n^\242$\210*\317 \262*\262\207\315\207" [#s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (approximate 6 exact 16)) + position-bytes generate-new-buffer #1=" *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 set-buffer-multibyte nil encode-coding-region buffer-size] 13 "\n\n(fn POSITION QUALITY CODING-SYSTEM LINENO POINT-MIN)"] #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (utf-8 78 single-byte 122)) + position-bytes :bom 3 utf-16 exact 2 #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (approximate 195 exact 208)) generate-new-buffer #1# make-byte-code "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] set-buffer-multibyte nil encode-coding-region buffer-size] 18 (#$ . 11635)]) (provide 'mule-util)