;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&\207" [require vlf-base custom-declare-variable vlf-save-in-place funcall function #[0 "\300\207" [ask] 1] "Should VLF save in place when additional adjustment of file contentis needed." :group vlf :type (choice (const :tag "Always when applicable" t) (const :tag "Ask when applicable" 'ask) (const :tag "Never" nil))] 8) #@124 Write current chunk to file. Always return true to disable save. If changing size of chunk, shift remaining file content. (defalias 'vlf-write #[0 "\306 \203\307p!\204\310\311!\203~\210\312\313\314\"\210\315\316!\211\203):\203&\317\320 \210 \321U\203J\322\317\211\n\323\324ed\"%\210\211\203A\325 \210\326 !\211\202\324ed\"\327\f\n#\211\321U\203m\322\317\211\n\323\f\nZ%\210\203\325 \210\202` '\317\305\321!\210\330(!\204\220)\331=\203\212\310\332!\202\215)?\203\310\333\334!\335 \262\336(\323\211\211\211&\210\321W\203\264\337#\210\202\275\340[#\210\341(\323#\266\202\342\335 \262\321W\203\333\337\"\210\202\342\340[\"\210\203\352\305\342!\210'\343\n\f\nZ'W\203\377\n'\\\202\f\"\210b\210\344\345\335 Z\"\266\266\210\312\346\314\"\210\323\207" [buffer-undo-list vlf-file-size vlf-start-pos buffer-file-truename vlf-end-pos font-lock-mode buffer-modified-p verify-visited-file-modtime y-or-n-p "File has changed since visited or saved. Save anyway? " run-hook-with-args vlf-before-batch-functions write derived-mode-p hexl-mode nil vlf-tune-dehexlify 0 vlf-tune-write t vlf-tune-encode-length vlf-tune-hexlify vlf-get-file-size - file-remote-p ask "File content needs be adjusted till end. Use temporary copy of the whole file (slower but safer)? " make-temp-file "vlf" float-time copy-file vlf-file-shift-back vlf-file-shift-forward rename-file 1 vlf-move-to-chunk-2 message "Save took %f seconds" vlf-after-batch-functions vlf-batch-size buffer-file-name vlf-save-in-place] 16 (#$ . 800) nil]) #@199 Shift file contents SIZE-CHANGE bytes back. WRITE-SIZE is byte length of saved chunk. FILE if given is filename to be used, otherwise `buffer-file-name'. (fn SIZE-CHANGE WRITE-SIZE &optional FILE) (defalias 'vlf-file-shift-back #[770 "\306\307\211?\205\n\310&\210 \311\312\313 \n#\f\310\314\315\316\317\320!\321\"\322$\216\323\211 Z#\203Q \\\262\211\247\203H\211@Y\205L\324\"\266\202)\325 \210\326\310\"\210\327\330\"\210)\210\306\307\211\n Z?\205p\310\n &\210\331!)\207" [vlf-start-pos vlf-end-pos vlf-file-size coding-system-for-write buffer-undo-list vlf-batch-size vlf-tune-write nil t no-conversion make-progress-reporter "Adjusting file content..." make-byte-code 0 "\300\211\207" vconcat vector [buffer-undo-list] 2 vlf-shift-batch progress-reporter-do-update erase-buffer vlf-verify-size insert-char 32 progress-reporter-done] 13 (#$ . 2380)]) #@161 Read `vlf-batch-size' bytes from READ-POS and write them back at WRITE-POS using FILE. Return nil if EOF is reached, t otherwise. (fn READ-POS WRITE-POS FILE) (defalias 'vlf-shift-batch #[771 "\302 \210\303\304\"\210\305\306\307#\210\\ ^\310#\210\311\307\211\312 Z&\210\211 W\207" [vlf-batch-size vlf-file-size erase-buffer vlf-verify-size t vlf-tune-batch (:raw :write) nil vlf-tune-insert-file-contents-literally vlf-tune-write 0] 11 (#$ . 3281)]) #@267 Shift file contents SIZE-CHANGE bytes forward. WRITE-SIZE is byte length of saved chunk. FILE if given is filename to be used, otherwise `buffer-file-name'. Done by saving content up front and then writing previous batch. (fn SIZE-CHANGE WRITE-SIZE &optional FILE) (defalias 'vlf-file-shift-forward #[770 "\306\307\310#\210] \n\311\312\n #\f\313\314\315\316\317\320!\321\"\322$\216\323\n\313 &\203\237\306\324\310#\210\\\262\\\262\262]\262\211\247\203V\211@Y\205Z\325\"\266\326\323\n\310 &\203\236\306\327\310#\210\\\262\\\262\262]\262\211\247\203\225\211@Y\205\231\325\"\266\202^))\210\330!\207" [vlf-batch-size vlf-end-pos vlf-start-pos vlf-file-size buffer-undo-list coding-system-for-write vlf-tune-batch (:raw :write) nil make-progress-reporter "Adjusting file content..." t make-byte-code 0 "\300\211\207" vconcat vector [buffer-undo-list] 2 vlf-shift-batches (:raw :write) progress-reporter-do-update no-conversion (:raw :write) progress-reporter-done] 15 (#$ . 3752)]) #@388 Append READ-SIZE bytes of file starting at READ-POS. Then write initial buffer content to file at WRITE-POS. WRITE-SIZE is byte length of saved chunk. If HIDE-READ is non nil, temporarily hide literal read content. FILE if given is filename to be used, otherwise `buffer-file-name'. Return nil if EOF is reached, t otherwise. (fn READ-SIZE READ-POS WRITE-POS WRITE-SIZE HIDE-READ FILE) (defalias 'vlf-shift-batches #[1542 "\301\302\"\210Wed\203\211b\210\303\n\f\\^#\210\203'}\210\304 \2047?\2068\305\n &\210|\210\203I~\210\207" [vlf-file-size vlf-verify-size t vlf-tune-insert-file-contents-literally vlf-tune-write 0] 16 (#$ . 4806)]) (provide 'vlf-write)