;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\302\303\304\305\306\307&\210\310\311\312\313\314DD\315\306\301\316\317&\210\310\320\312\313\321DD\322\306\301\316\323&\210\310\324\312\313\325DD\326\306\301\316\327&\210\330\331!\204C\332\331\333\"\210\302\207" [custom-declare-group vlf nil "View Large Files in Emacs." :prefix "vlf-" :group files custom-declare-variable vlf-batch-size funcall function #[0 "\300\207" [1000000] 1] "Defines how large each batch of file data initially is (in bytes)." :type integer vlf-application #[0 "\300\207" [ask] 1] "Determines when `vlf' will be offered on opening files.\nPossible values are: nil to never use it;\n`ask' offer `vlf' when file size is beyond `large-file-warning-threshold';\n`dont-ask' automatically use `vlf' for large files;\n`always' use `vlf' for all files." (radio (const :format "%v " nil) (const :format "%v " ask) (const :format "%v " dont-ask) (const :format "%v" always)) vlf-forbidden-modes-list #[0 "\300\207" [(archive-mode tar-mode jka-compr git-commit-mode image-mode doc-view-mode doc-view-mode-maybe ebrowse-tree-mode)] 1] "Major modes which VLF will not be automatically applied to." (list symbol) 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)"]] 8) #@52 Determine major mode from FILENAME. (fn FILENAME) (defalias 'vlf-determine-major-mode #[257 "\211\304!\305\306!\262;\203\307\310!\"\203\311\225\305O\262\312>\2030\313\314\n\307#)\202G\305\314\n\307#)\206G \205G\313\314\n\307#)\262\211\203X\211:\203X\211A@\202Y\211\207" [system-type case-fold-search auto-mode-alist auto-mode-case-fold file-remote-p nil file-name-sans-versions string-match regexp-quote 0 (windows-nt cygwin) t assoc-default] 8 (#$ . 1709)]) #@29 View Large FILE in batches. (autoload 'vlf "vlf" '(#$ . 2202) t) (byte-code "\300\301\302\303\304$\210\305\301\306\"\207" [ad-add-advice abort-if-file-too-large (vlf-if-file-too-large nil t (advice lambda nil "If file SIZE larger than `large-file-warning-threshold', allow user to view file with `vlf', open it normally, or abort.\nOP-TYPE specifies the file operation being performed over FILENAME." (cond ((or (not size) (zerop size))) ((or (not vlf-application) (not filename) (memq (vlf-determine-major-mode filename) vlf-forbidden-modes-list)) ad-do-it) ((eq vlf-application 'always) (vlf filename) (error #1="")) ((and large-file-warning-threshold (< large-file-warning-threshold size) (< vlf-batch-size size)) (if (eq vlf-application 'dont-ask) (progn (vlf filename) (error #1#)) (let ((char nil)) (while (not (memq (setq char (read-event (propertize (format "File %s is large (%s): %s normally (o), %s with vlf (v) or abort (a)" (if filename (file-name-nondirectory filename) #1#) (file-size-human-readable size) op-type op-type) 'face 'minibuffer-prompt))) '(111 79 118 86 97 65)))) (cond ((memq char '(118 86)) (vlf filename) (error #1#)) ((memq char '(97 65)) (error "Aborted"))))))))) around nil ad-activate t] 5) #@86 Build advice to disable VLF during execution of FUNCdefined in FILE. (fn FUNC FILE) (defalias 'vlf-disable-for-function '(macro . #[514 "\300\301\302\303\304\305\306\n!P!\307BB\310BBBDE\207" [eval-after-load quote defadvice around intern "vlf-" symbol-name (compile activate) ("Temporarily disable `vlf-mode'." (let ((vlf-application nil)) ad-do-it))] 12 (#$ . 3434)])) (byte-code "\300\301\302\"\210\300\301\303\"\210\300\304\305\"\207" [eval-after-load "etags" #[0 "\300\301\302\303\304$\210\305\301\306\"\210\301\207" [ad-add-advice tags-verify-table (vlf-tags-verify-table nil t (advice lambda nil #1="Temporarily disable `vlf-mode'." #2=(let ((vlf-application nil)) ad-do-it))) around nil ad-activate t] 5] #[0 "\300\301\302\303\304$\210\305\301\306\"\210\301\207" [ad-add-advice tag-find-file-of-tag-noselect (vlf-tag-find-file-of-tag-noselect nil t (advice lambda nil #1# #2#)) around nil ad-activate t] 5] "helm-tags" #[0 "\300\301\302\303\304$\210\305\301\306\"\210\301\207" [ad-add-advice helm-etags-create-buffer (vlf-helm-etags-create-buffer nil t (advice lambda nil #1# #2#)) around nil ad-activate t] 5]] 3) #@52 In Dired, visit the file on this line in VLF mode. (defalias 'dired-vlf #[0 "\300\301 !\207" [vlf dired-get-file-for-visit] 2 (#$ . 4566) nil]) (byte-code "\300\301\302\"\210\303\304!\207" [eval-after-load "dired" #[0 "\301\302\303#\207" [dired-mode-map define-key "V" dired-vlf] 4] provide vlf-setup] 3)