mirror of
https://github.com/m00natic/vlfi.git
synced 2025-02-23 21:38:05 +00:00
Add autoload cookies to fix package installation.
This commit is contained in:
parent
2564c9af77
commit
e43725e8d4
6
vlf.el
6
vlf.el
@ -176,19 +176,22 @@ You can customize the number of bytes to
|
|||||||
(vlf-mode)
|
(vlf-mode)
|
||||||
(switch-to-buffer (current-buffer))))
|
(switch-to-buffer (current-buffer))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
(defun dired-vlf (from-end)
|
(defun dired-vlf (from-end)
|
||||||
"In Dired, visit the file on this line in VLF mode.
|
"In Dired, visit the file on this line in VLF mode.
|
||||||
With FROM-END prefix, view from the back."
|
With FROM-END prefix, view from the back."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(vlf from-end (dired-get-file-for-visit)))
|
(vlf from-end (dired-get-file-for-visit)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
(eval-after-load "dired"
|
(eval-after-load "dired"
|
||||||
'(define-key dired-mode-map "V" 'dired-vlf))
|
'(define-key dired-mode-map "V" 'dired-vlf))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
(defun vlf-if-file-too-large (size op-type filename)
|
(defun vlf-if-file-too-large (size op-type filename)
|
||||||
"If file SIZE larger than `large-file-warning-threshold', \
|
"If file SIZE larger than `large-file-warning-threshold', \
|
||||||
allow user to view file with `vlf', open it normally or abort.
|
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
|
(when (and large-file-warning-threshold size
|
||||||
(> size large-file-warning-threshold))
|
(> size large-file-warning-threshold))
|
||||||
(let ((char nil))
|
(let ((char nil))
|
||||||
@ -209,6 +212,7 @@ OP-TYPE specifies the file operation being performed over FILENAME."
|
|||||||
(error "Aborted"))))))
|
(error "Aborted"))))))
|
||||||
|
|
||||||
;;; hijack `abort-if-file-too-large'
|
;;; hijack `abort-if-file-too-large'
|
||||||
|
;;;###autoload
|
||||||
(fset 'abort-if-file-too-large 'vlf-if-file-too-large)
|
(fset 'abort-if-file-too-large 'vlf-if-file-too-large)
|
||||||
|
|
||||||
(provide 'vlf)
|
(provide 'vlf)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user