;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&\210\302\317\304\305\320DD\321\310\311\312\322&\207" [require vlf-base custom-declare-variable vlf-before-batch-functions funcall function #[0 "\300\207" [nil] 1] "Hook that runs before multiple batch operations.\nOne argument is supplied that specifies current action. Possible\nvalues are: `write', `ediff', `occur', `search', `goto-line'." :group vlf :type hook vlf-after-batch-functions #[0 "\300\207" [nil] 1] "Hook that runs after multiple batch operations.\nOne argument is supplied that specifies current action. Possible\nvalues are: `write', `ediff', `occur', `search', `goto-line'." vlf-batch-size-remote #[0 "\300\207" [1024] 1] "Defines size (in bytes) of a batch of file data when accessed remotely." integer] 8) #@30 Write current chunk to file. (autoload 'vlf-write "vlf-write" '(#$ . 1255) t) #@57 Search forward for REGEXP prefix COUNT number of times. (autoload 'vlf-re-search-forward "vlf-search" '(#$ . 1339) t) #@58 Search backward for REGEXP prefix COUNT number of times. (autoload 'vlf-re-search-backward "vlf-search" '(#$ . 1463) t) #@13 Go to line. (autoload 'vlf-goto-line "vlf-search" '(#$ . 1589) t) #@39 Query replace regexp over whole file. (autoload 'vlf-query-replace "vlf-search" '(#$ . 1661) t) #@47 Make whole file occur style index for REGEXP. (autoload 'vlf-occur "vlf-occur" '(#$ . 1763) t) #@56 Toggle continuous chunk recenter around current point. (autoload 'vlf-toggle-follow "vlf-follow" '(#$ . 1864) t) #@27 Stop continuous recenter. (autoload 'vlf-stop-follow "vlf-follow" '(#$ . 1983) t) #@44 Run batch by batch ediff over VLF buffers. (autoload 'vlf-ediff-buffers "vlf-ediff" '(#$ . 2071) t) #@24 Keymap for `vlf-mode'. (defvar vlf-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\317#\210\301\320\321#\210\301\322\323#\210\301\324\325#\210\301\326\327#\210\301\330\331#\210\301\332\333#\210\301\334\335#\210\301\336\337#\210\301\340\341#\210\211\207" [make-sparse-keymap define-key "n" vlf-next-batch "p" vlf-prev-batch " " vlf-next-batch-from-point "+" vlf-change-batch-size "-" #[0 "\300\301!\207" [vlf-change-batch-size t] 2 "Decrease vlf batch size by factor of 2." nil] "s" vlf-re-search-forward "r" vlf-re-search-backward "%" vlf-query-replace "o" vlf-occur "[" vlf-beginning-of-file "]" vlf-end-of-file "j" vlf-jump-to-chunk "l" vlf-goto-line "e" vlf-ediff-buffers "f" vlf-toggle-follow "g" vlf-revert] 5) (#$ . 2177)) #@33 Prefixed keymap for `vlf-mode'. (defvar vlf-prefix-map (byte-code "\301 \302\303#\210\211\207" [vlf-mode-map make-sparse-keymap define-key ""] 5) (#$ . 3017)) #@85 Non-nil if Vlf mode is enabled. Use the command `vlf-mode' to change this variable. (defvar vlf-mode nil (#$ . 3186)) (make-variable-buffer-local 'vlf-mode) #@52 Mode to browse large files in. (fn &optional ARG) (defalias 'vlf-mode #[256 "\306 \307=\203 ?\202\310!\311V\211\203Z\312\301!\210\313\314\315\316\313\317$\210\312\302!\210\320\312\321!\210\322 !\311\2118\323`!\211\245_\324Z!b\210\325!\266\314\326\327\317\211$\210\327 \210\2029\203q\f9W\204q\330\331\332\333\f!\"!\203\376\334\302!\210\335 \210\334\301!\210\336\315\316\317#\210\336\326\327\317#\210\337\340!\203\320 T:\245`;:\203\235\313;;\317;\341\311\342\343\344!\345\"\346$\216\317<\347=\317\313\211\317%\210\350 \210*\210\351\313!\210eb\210y\210\211u\266\202 \323`!\\\317<;\317;\341\311\342\343\344!\352\"\346$\216\353=\317\313\211\317%\210)\210\324!b\210)\210\202\317\354\355\203\n\356\202 \357\"\210\360\361!\203/\306 \203\211\306 \232\203/\362\363\364\203*\365\202+\366#\266\210\367 \210\207" [vlf-mode require-final-newline revert-buffer-function buffer-file-truename vlf-file-size vlf-start-pos current-message toggle prefix-numeric-value 0 make-local-variable nil add-hook write-file-functions vlf-write t vlf-revert vlf-batch-size vlf-get-file-size position-bytes byte-to-position vlf-move-to-batch after-change-major-mode-hook vlf-keep-alive y-or-n-p format "Load whole file (%s)? " file-size-human-readable kill-local-variable vlf-stop-follow remove-hook derived-mode-p hexl-mode make-byte-code "\300\211\207" vconcat vector [buffer-undo-list] 2 insert-file-contents-literally hexlify-buffer set-buffer-modified-p [buffer-undo-list] insert-file-contents run-hooks vlf-mode-hook vlf-mode-on-hook vlf-mode-off-hook called-interactively-p any " in current buffer" message "Vlf mode %sabled%s" "en" "dis" force-mode-line-update vlf-end-pos large-file-warning-threshold hexl-bits buffer-undo-list inhibit-read-only buffer-file-name] 12 (#$ . 3349) (byte-code "\206\301C\207" [current-prefix-arg toggle] 1)]) (defvar vlf-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\305\306\307\310\211%\207" [vlf-prefix-map vlf-mode-hook variable-documentation put "Hook run after entering or leaving `vlf-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" add-minor-mode vlf-mode (:eval (format " VLF[%d/%d](%s)" (ceiling vlf-end-pos vlf-batch-size) (ceiling vlf-file-size vlf-batch-size) (file-size-human-readable vlf-file-size))) nil] 6) #@39 Keep `vlf-mode' on major mode change. (defalias 'vlf-keep-alive #[0 "\302\303!\203\f\304\300!\210\305\306\211\207" [revert-buffer-function vlf-mode derived-mode-p hexl-mode make-local-variable vlf-revert t] 2 (#$ . 5761)]) #@201 View Large FILE in batches. When MINIMAL load just a few bytes. You can customize number of bytes displayed by customizing `vlf-batch-size'. Return newly created buffer. (fn FILE &optional MINIMAL) (defalias 'vlf #[513 "\302\303!\211q\210\304!\210\305\306!\210\203\307\300!\210\310\202'\311!\203'\307\300!\210 \312\313!\210\2037\314\300!\210\307\300!\210\315!\210\211\207" [vlf-batch-size vlf-batch-size-remote generate-new-buffer "*vlf*" set-visited-file-name set-buffer-modified-p nil make-local-variable 1024 file-remote-p vlf-mode 1 kill-local-variable switch-to-buffer] 5 (#$ . 5994) (byte-code "\300\301!\302D\207" [read-file-name "File to open: " nil] 2)]) #@229 Display the next batch of file data. When prefix argument is supplied and positive jump over APPEND number of batches. When prefix argument is negative append next APPEND number of batches to the existing buffer. (fn APPEND) (defalias 'vlf-next-batch #[257 "\304 \210\305\306\307!\203\310\202\311!\210 \312!_\\\n^\313W\203$ \202'\211 Z\314\"\207" [vlf-end-pos vlf-batch-size vlf-file-size vlf-start-pos vlf-verify-size vlf-tune-load derived-mode-p hexl-mode (:hexl :raw) (:insert :encode) abs 0 vlf-move-to-chunk] 6 (#$ . 6679) "p"]) #@240 Display the previous batch of file data. When prefix argument is supplied and positive jump over PREPEND number of batches. When prefix argument is negative append previous PREPEND number of batches to the existing buffer. (fn PREPEND) (defalias 'vlf-prev-batch #[257 "\303U\203\n\304\305!\210\306\307\310!\203\311\202\312!\210\303 \313!_Z]\303W\203+\n\202.\211 \\\314\"\207" [vlf-start-pos vlf-batch-size vlf-end-pos 0 error "Already at BOF" vlf-tune-load derived-mode-p hexl-mode (:hexl :raw) (:insert :encode) abs vlf-move-to-chunk] 6 (#$ . 7234) "p"]) (byte-code "\300\301\302\303\304$\210\305\301\306\"\210\300\307\310\303\304$\210\305\307\306\"\210\311\312\313\"\207" [ad-add-advice scroll-up (vlf-scroll-up nil t (advice lambda nil "Slide to next batch if at end of buffer in `vlf-mode'." (if (and vlf-mode (pos-visible-in-window-p (point-max))) (progn (vlf-next-batch 1) (goto-char (point-min))) ad-do-it))) around nil ad-activate t scroll-down (vlf-scroll-down nil t (advice lambda nil "Slide to previous batch if at beginning of buffer in `vlf-mode'." (if (and vlf-mode (pos-visible-in-window-p (point-min))) (progn (vlf-prev-batch 1) (goto-char (point-max))) ad-do-it))) eval-after-load "hexl" #[0 "\300\301\302\303\304$\210\305\301\306\"\210\300\307\310\303\304$\210\305\307\306\"\210\300\311\312\303\304$\210\305\311\306\"\210\300\313\314\303\304$\210\305\313\306\"\210\313\207" [ad-add-advice hexl-save-buffer (vlf-hexl-save nil t (advice lambda nil "Prevent hexl save if `vlf-mode' is active." (if vlf-mode (vlf-write) ad-do-it))) around nil ad-activate t hexl-scroll-up (vlf-hexl-scroll-up nil t (advice lambda nil "Slide to next batch if at end of buffer in `vlf-mode'." (if (and vlf-mode (pos-visible-in-window-p (point-max)) (or (not (numberp arg)) (< 0 arg))) (progn (vlf-next-batch 1) (goto-char (point-min))) ad-do-it))) hexl-scroll-down (vlf-hexl-scroll-down nil t (advice lambda nil "Slide to previous batch if at beginning of buffer in `vlf-mode'." (if (and vlf-mode (pos-visible-in-window-p (point-min))) (progn (vlf-prev-batch 1) (goto-char (point-max))) ad-do-it))) hexl-mode-exit (vlf-hexl-mode-exit nil t (advice lambda nil "Exit `hexl-mode' gracefully in case `vlf-mode' is active." (if (and vlf-mode (not (buffer-modified-p))) (vlf-with-undo-disabled (erase-buffer) ad-do-it (vlf-move-to-chunk-2 vlf-start-pos vlf-end-pos)) ad-do-it)))] 5]] 5) #@147 Change the buffer-local value of `vlf-batch-size'. Normally, the value is doubled; with the prefix argument DECREASE it is halved. (fn DECREASE) (defalias 'vlf-change-batch-size #[257 "\301\203 \302\245\202\302_!\207" [vlf-batch-size vlf-set-batch-size 2] 4 (#$ . 9633) "P"]) #@54 Set batch to SIZE bytes and update chunk. (fn SIZE) (defalias 'vlf-set-batch-size #[257 "\211\302 !\207" [vlf-batch-size vlf-start-pos vlf-move-to-batch] 3 (#$ . 9922) (byte-code "\300\301\302\303\304!\203 \305\202\306!\"C\207" [read-number "Size in bytes: " vlf-tune-optimal-load derived-mode-p hexl-mode (:hexl :raw) (:insert :encode)] 5)]) #@36 Jump to beginning of file content. (defalias 'vlf-beginning-of-file #[0 "\300\301\302!\203 \303\202\f\304!\210\305\306!\207" [vlf-tune-load derived-mode-p hexl-mode (:hexl :raw) (:insert :encode) vlf-move-to-batch 0] 3 (#$ . 10276) nil]) #@30 Jump to end of file content. (defalias 'vlf-end-of-file #[0 "\301 \210\302\303\304!\203\305\202\306!\210\307!\207" [vlf-file-size vlf-verify-size vlf-tune-load derived-mode-p hexl-mode (:hexl :raw) (:insert :encode) vlf-move-to-batch] 3 (#$ . 10522) nil]) #@111 Revert current chunk. Ignore _AUTO. Ask for confirmation if NOCONFIRM is nil. (fn &optional AUTO NOCONFIRM) (defalias 'vlf-revert #[512 "\211\204 \303\304\305\"!\205\306\307!\210\310 \n\"\207" [buffer-file-name vlf-start-pos vlf-end-pos yes-or-no-p format "Revert buffer from file %s? " set-buffer-modified-p nil vlf-move-to-chunk-2] 6 (#$ . 10790) nil]) #@27 Go to to chunk N. (fn N) (defalias 'vlf-jump-to-chunk #[257 "\301\302\303!\203 \304\202\f\305!\210\306S_!\207" [vlf-batch-size vlf-tune-load derived-mode-p hexl-mode (:hexl :raw) (:insert :encode) vlf-move-to-batch] 4 (#$ . 11157) "nGoto to chunk: "]) #@43 Ensure there are no buffer modifications. (defalias 'vlf-no-modifications #[0 "\300 \203 \301\302!\207\303\207" [buffer-modified-p error "Save or discard your changes first" t] 2 (#$ . 11420)]) #@116 Move to batch determined by START. Adjust according to file start/end and show `vlf-batch-size' bytes. (fn START) (defalias 'vlf-move-to-batch #[257 "\302 \210\303]\211\\ ^ U\203\303Z]\262\304\"\207" [vlf-batch-size vlf-file-size vlf-verify-size 0 vlf-move-to-chunk] 6 (#$ . 11622)]) #@57 Display batch of file data starting from current point. (defalias 'vlf-next-batch-from-point #[0 "\302\303`!\304#\305\211 \\\"\266eb\207" [vlf-start-pos vlf-batch-size + position-bytes -1 vlf-move-to-chunk] 5 (#$ . 11923) nil]) (provide 'vlf)