From 2564c9af774300551b6330808242869ecd49faef Mon Sep 17 00:00:00 2001 From: Andrey Kotlarski Date: Sun, 13 Jan 2013 15:24:56 +0200 Subject: [PATCH] Plug option for vlf when opening files on package load. --- README.org | 11 ----------- vlf.el | 27 ++------------------------- 2 files changed, 2 insertions(+), 36 deletions(-) diff --git a/README.org b/README.org index 7301d7a..8b174c5 100644 --- a/README.org +++ b/README.org @@ -2,14 +2,3 @@ An Emacs mode that allows viewing files in chunks. This is a fork that builds on the GNU ELPA vlf.el. - -* Usage tips - -When opening file, by default Emacs checks its size against -`large-file-warning-threshold' and if larger asks for confirmation. -To add vlf as an option in these cases: - -#+BEGIN_SRC emacs-lisp -(if (fboundp 'vlf-if-file-too-large) - (fset 'abort-if-file-too-large 'vlf-if-file-too-large)) -#+END_SRC diff --git a/vlf.el b/vlf.el index 44b0f15..7941cd3 100644 --- a/vlf.el +++ b/vlf.el @@ -185,8 +185,6 @@ With FROM-END prefix, view from the back." (eval-after-load "dired" '(define-key dired-mode-map "V" 'dired-vlf)) -;;; use this to hijack `abort-if-file-too-large' -;;;###autoload (defun vlf-if-file-too-large (size op-type filename) "If file SIZE larger than `large-file-warning-threshold', \ allow user to view file with `vlf', open it normally or abort. @@ -210,29 +208,8 @@ OP-TYPE specifies the file operation being performed over FILENAME." ((memq char '(?a ?A)) (error "Aborted")))))) -;;;; ChangeLog: - -;; 2012-11-29 Sam Steingold -;; -;; hook into dired -;; -;; 2012-06-17 Chong Yidong -;; -;; vlf.el: Improve commentary. -;; -;; 2012-06-15 Sam Steingold -;; -;; fix vlf-change-batch-size binding -;; -;; 2012-06-14 Sam Steingold -;; -;; complete rewrite by Sam Steingold -;; -;; 2012-06-14 Sam Steingold -;; -;; View Large Files from Mathias Dahl -;; - +;;; hijack `abort-if-file-too-large' +(fset 'abort-if-file-too-large 'vlf-if-file-too-large) (provide 'vlf)