;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; 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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\313&\210\302\314\304\305\315DD\316\310\311\312\313&\207" [require vlf-tune custom-declare-variable vlf-before-chunk-update-hook funcall function #[0 "\300\207" [nil] 1] "Hook that runs before chunk update." :group vlf :type hook vlf-after-chunk-update-hook #[0 "\300\207" [nil] 1] "Hook that runs after chunk update."] 8) #@47 Absolute position of the visible chunk start. (defvar vlf-start-pos 0 (#$ . 796)) (byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local vlf-start-pos put permanent-local t] 4) #@45 Absolute position of the visible chunk end. (defvar vlf-end-pos 0 (#$ . 1000)) (byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local vlf-end-pos put permanent-local t] 4) #@55 Minimal number of bytes that can be properly decoded. (defconst vlf-sample-size 24 (#$ . 1199)) #@39 Get size in bytes of FILE. (fn FILE) (defalias 'vlf-get-file-size #[257 "\300\301!8\206 \302\207" [7 file-attributes 0] 4 (#$ . 1301)]) #@212 Update file size information if necessary and visited file time. If non-nil, UPDATE-VISITED-TIME. FILE if given is filename to be used, otherwise `buffer-file-truename'. (fn &optional UPDATE-VISITED-TIME FILE) (defalias 'vlf-verify-size #[512 "\302p!?\205\303\206 !\205\304 \207" [buffer-file-truename vlf-file-size verify-visited-file-modtime vlf-get-file-size set-visited-file-modtime] 4 (#$ . 1447)]) (byte-code "\300\301!\204 \302\301\303\"\210\300\207" [fboundp file-size-human-readable defalias #[257 "\300\301\302\245\"\207" [format "%.3fMB" 1048576.0] 5 "Print FILE-SIZE in MB.\n\n(fn FILE-SIZE)"]] 3) #@63 Execute BODY with temporarily disabled undo. (fn &rest BODY) (defalias 'vlf-with-undo-disabled '(macro . #[128 "\300\301\302\303\304B\305BBF\207" [let ((undo-list buffer-undo-list)) (setq buffer-undo-list t) unwind-protect progn ((setq buffer-undo-list undo-list))] 7 (#$ . 2075)])) #@203 Move to chunk enclosed by START END bytes. If same as current chunk is requested, do nothing. Return number of bytes moved back for proper decoding and number of bytes added to the end. (fn START END) (defalias 'vlf-move-to-chunk #[514 "\304 \210\211X\204\211\305X\204X\203>\306 \203 \307\310!\205g\311 \210\312\313!\210X\2031\2022\305\211\211ZZB\207\314\315!\203V\316 \"Z\262\211 \316 \"Z\\\262 U\203c\211\nU?\205g\317\"\207" [vlf-file-size vlf-start-pos vlf-end-pos hexl-bits vlf-verify-size 0 buffer-modified-p y-or-n-p "Chunk modified, are you sure? " erase-buffer set-buffer-modified-p nil derived-mode-p hexl-mode mod vlf-move-to-chunk-1] 7 (#$ . 2367)]) #@175 Move to chunk enclosed by START END keeping as much edits if any. Return number of bytes moved back for proper decoding and number of bytes added to the end. (fn START END) (defalias 'vlf-move-to-chunk-1 #[514 "~\210\305 \306]^\307\310!\311\211\203+\203\"\312\262 \262\312\313 \210\n\314ed\"\\\202, \203>\204>\315\"\202\211W\204Q\nW\204Q\316p!\204q\203\\\317\320!\205\321\311!\210:\203h\311\262\315\"\202\nU\203\224U\203\224?\205:\203\213\311\262\315\"\202\204\247 :\204\247\315\"\202\203\276\nX\203\270\211X\204\276\317\320!\205\322\323!\210\203\324\204\324 :\203\321\311\313 \210\306\211\324`!\n\\\312\nU\203 \312=\204\354\311 \312\325\306\326\327\330!\331\"\332$\216\333 \210)\210\311\262\n\202LW\203)\334e\n \335 \nZ!\206ed^\311&@\262\202LW\203L \312\325\306\326\327\330!\336\"\332$\216\337 \n\311\312d%A\262)\210\\U\203{ \312=\204`\311 \312\325\306\326\327\330!\340\"\332$\216e`|\210)\210\311\262\n\202\333\n W\203\246\334e\n \f\335\nZ!\206\222`d^\312&\211@\262\n\341eAZ!\266\202\333\nW\203\333d \312\325\306\326\327\330!\342\"\332$\216\337 \n\312\311%@\262eb\210\343d\"c\210)\210\341dZ!\266Z\262 \335\nZ!\206\363\335\nZ!\206\363db\210)\210\321 !\210\344 \210\203\f\345 \210\311\262\322\346!\210B\266\202\203\345 \210\207" [vlf-file-size buffer-undo-list vlf-start-pos vlf-end-pos inhibit-read-only buffer-modified-p 0 derived-mode-p hexl-mode nil t vlf-tune-dehexlify vlf-tune-encode-length vlf-move-to-chunk-2 verify-visited-file-modtime y-or-n-p "Chunk modified, are you sure? " set-buffer-modified-p run-hooks vlf-before-chunk-update-hook position-bytes make-byte-code "\300\211\207" vconcat vector [buffer-undo-list] 2 erase-buffer vlf-delete-region byte-to-position [buffer-undo-list] vlf-insert-file-contents [buffer-undo-list] vlf-shift-undo-list [buffer-undo-list] delete-and-extract-region set-visited-file-modtime vlf-tune-hexlify vlf-after-chunk-update-hook] 20 (#$ . 3068)]) #@168 Unconditionally move to chunk enclosed by START END bytes. Return number of bytes moved back for proper decoding and number of bytes added to the end. (fn START END) (defalias 'vlf-move-to-chunk-2 #[514 "\305\306!\210\307\211\310\311!\211\204-\312p!\203-U?\205 U?\262U?\205+ U?\262\313\307!\210\314]\n^\315\307\316`!\f\307\317\314\320\321\322!\323\"\324$\216\325 \210\203a\326 \"\210\327 \210\202u\330   $\262@Z A\\)\210\331@\\!\206\201db\210)\266\332\333!\210\f\307=\204\222\333\305\334!\210\211\262\207" [vlf-start-pos vlf-end-pos vlf-file-size inhibit-read-only buffer-undo-list run-hooks vlf-before-chunk-update-hook t derived-mode-p hexl-mode verify-visited-file-modtime vlf-verify-size 0 (0 . 0) position-bytes make-byte-code "\300\211\207" vconcat vector [buffer-undo-list] 2 erase-buffer vlf-tune-insert-file-contents-literally vlf-tune-hexlify vlf-insert-file-contents byte-to-position set-buffer-modified-p nil vlf-after-chunk-update-hook] 15 (#$ . 5143)]) #@368 Adjust chunk at absolute START to END till content can beproperly decoded. ADJUST-START determines if trying to prepend bytes to the beginning, ADJUST-END - append to the end. Use buffer POSITION as start if given. Return number of bytes moved back for proper decoding and number of bytes added to the end. (fn START END ADJUST-START ADJUST-END &optional POSITION) (defalias 'vlf-insert-file-contents #[1284 "\205U?\262\211\206e\262\203!\301X\203!\302\262\303\262\211b\210\303\211\2033\301\\^\2024\203L\304$\262Z\262\202R\305\"\210\203h\306 \nd\302\307&@Z\262B\207" [vlf-file-size 4 nil 0 vlf-adjust-start vlf-insert-file-contents-1 vlf-delete-region start] 16 (#$ . 6160)]) #@58 Extract decoded file bytes START to END. (fn START END) (defalias 'vlf-insert-file-contents-1 #[514 "\302U\203 \303\"\207\303\")\207" [buffer-file-coding-system coding-system-for-read 0 vlf-tune-insert-file-contents] 5 (#$ . 6895)]) #@262 Adjust chunk beginning at absolute START to END till content canbe properly decoded. Use buffer POSITION as start. ADJUST-END is non-nil if end would be adjusted later. Return number of bytes moved back for proper decoding. (fn START END POSITION ADJUST-END) (defalias 'vlf-adjust-start #[1028 "\305\306Z]\\^\211Z U\206?\205U\305\n\307\f\310$\210\305U)\204l\211\311W\203l\312d\n\313$GZ\203J\211\305U?\202S\211\314W\206S\305W\262\203l\211T\262S\262T\262d|\210\202\315\f \313\316&@\262U\204\220d|\210\317 \"\210Z\207" [vlf-sample-size vlf-file-size buffer-file-coding-system coding-system-for-read buffer-file-name 0 4 insert-file-contents nil 3 encode-coding-region t -3 vlf-delete-region start vlf-insert-file-contents-1] 17 (#$ . 7144)]) #@625 Delete from chunk starting at POSITION enclosing absolute filepositions START to END at absolute position BORDER. Start search for best cut at CUT-POINT. Delete from buffer beginning if FROM-START is non nil or up to buffer end otherwise. ENCODE-DIRECTION determines which side of the region to use to calculate cut position's absolute file position. Possible values are: `start' - from the beginning; `end' - from end; nil - the shorter side. Return actual absolute position of new border and buffer point at which deletion was performed. (fn POSITION START END BORDER CUT-POINT FROM-START &optional ENCODE-DIRECTION) (defalias 'vlf-delete-region #[1798 "\211\203\n\211\302=\202ZZW\211\203\303d\"Z\202(\303 \"\\\304W\203NW\203|\305\211S\306$G\262S\262Z\262\2020W\203l\305\211T\306$G\262T\262\\\262\202NU\204|S\262Z\262\204\220U\204\220T\262\\\262 \306\307\304\310\311\312!\313\"\314$\216\203\254\n|\210\202\261d|\210)\210TB\207" [buffer-file-coding-system buffer-undo-list end vlf-tune-encode-length 0 encode-coding-region t make-byte-code "\300\211\207" vconcat vector [buffer-undo-list] 2] 17 (#$ . 7954)]) #@54 Determine global byte position of POINT. (fn POINT) (defalias 'vlf-byte-position #[257 "d\211\302\245W\203\303T^\"Z\202 \303e\"\\\207" [vlf-end-pos vlf-start-pos 2 vlf-tune-encode-length] 6 (#$ . 9159)]) #@47 Shift undo list element regions by N. (fn N) (defalias 'vlf-shift-undo-list #[257 "?\206\301=\206e\302\3032\211\203\211@\211\204 \302\202\211\247\203;\211\\\211W\2035\304\303\"\2026\211\262\202\211@\211\247\203a\211\\\211W\203U\304\303\"\202\\\211A\\B\262\202\211;\203\221A\305W\306!\\\211W\203\200\304\303\"\202\214\203\211\202\213[B\266\203\202\211\204\304\3078\\\211W\203\252\304\303\"\202\277\302A@\3108AAAA \\BBBB\262\202\211\311=\203A@\247\203\3108\\\211W\203\346\304\303\"\202\311A@\3078\n\\\3128\313!ABBBBB\262\202\262B\262A\266\202\202\2620\266\202\237\211\207" [buffer-undo-list t nil end throw 0 abs 3 2 apply 4 last] 14 (#$ . 9380)]) (provide 'vlf-base)