1
0
mirror of https://github.com/m00natic/vlfi.git synced 2024-10-05 18:30:51 +01:00

Add autoload cookies to fix package installation.

This commit is contained in:
Andrey Kotlarski 2013-01-13 15:29:51 +02:00
parent 2564c9af77
commit e43725e8d4

6
vlf.el
View File

@ -176,19 +176,22 @@ You can customize the number of bytes to
(vlf-mode)
(switch-to-buffer (current-buffer))))
;;;###autoload
(defun dired-vlf (from-end)
"In Dired, visit the file on this line in VLF mode.
With FROM-END prefix, view from the back."
(interactive "P")
(vlf from-end (dired-get-file-for-visit)))
;;;###autoload
(eval-after-load "dired"
'(define-key dired-mode-map "V" 'dired-vlf))
;;;###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.
OP-TYPE specifies the file operation being performed over FILENAME."
OP-TYPE specifies the file operation being performed over FILENAME."
(when (and large-file-warning-threshold size
(> size large-file-warning-threshold))
(let ((char nil))
@ -209,6 +212,7 @@ OP-TYPE specifies the file operation being performed over FILENAME."
(error "Aborted"))))))
;;; hijack `abort-if-file-too-large'
;;;###autoload
(fset 'abort-if-file-too-large 'vlf-if-file-too-large)
(provide 'vlf)