1
0
mirror of https://github.com/m00natic/vlfi.git synced 2025-01-31 02:00:47 +00:00

Add lexical-bind declaration.

This commit is contained in:
Andrey Kotlarski 2013-01-13 15:45:55 +02:00
parent e43725e8d4
commit 59d5d2c487

37
vlf.el
View File

@ -1,4 +1,5 @@
;;; vlf.el --- View Large Files
;;; -*- lexical-bind: t -*-
;; Copyright (C) 2006, 2012, 2013 Free Software Foundation, Inc.
@ -192,24 +193,24 @@ With FROM-END prefix, view from the back."
"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."
(when (and large-file-warning-threshold size
(> size large-file-warning-threshold))
(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)"
(file-name-nondirectory filename)
(file-size-human-readable size)
op-type op-type)
'face 'minibuffer-prompt)))
'(?o ?O ?v ?V ?a ?A))))
(cond ((memq char '(?o ?O)))
((memq char '(?v ?V))
(vlf nil filename)
(error ""))
((memq char '(?a ?A))
(error "Aborted"))))))
(and large-file-warning-threshold size
(> size large-file-warning-threshold)
(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)"
(file-name-nondirectory filename)
(file-size-human-readable size)
op-type op-type)
'face 'minibuffer-prompt)))
'(?o ?O ?v ?V ?a ?A))))
(cond ((memq char '(?o ?O)))
((memq char '(?v ?V))
(vlf nil filename)
(error ""))
((memq char '(?a ?A))
(error "Aborted"))))))
;;; hijack `abort-if-file-too-large'
;;;###autoload