1
0
mirror of https://github.com/m00natic/vlfi.git synced 2025-02-07 13:40:49 +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 ;;; vlf.el --- View Large Files
;;; -*- lexical-bind: t -*-
;; Copyright (C) 2006, 2012, 2013 Free Software Foundation, Inc. ;; 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', \ "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 (and large-file-warning-threshold size
(> size large-file-warning-threshold)) (> size large-file-warning-threshold)
(let ((char nil)) (let ((char nil))
(while (not (memq (setq char (while (not (memq (setq char
(read-event (read-event
(propertize (propertize
(format "File %s is large (%s): %s normally (o), %s with vlf (v) or abort (a)" (format "File %s is large (%s): %s normally (o), %s with vlf (v) or abort (a)"
(file-name-nondirectory filename) (file-name-nondirectory filename)
(file-size-human-readable size) (file-size-human-readable size)
op-type op-type) op-type op-type)
'face 'minibuffer-prompt))) 'face 'minibuffer-prompt)))
'(?o ?O ?v ?V ?a ?A)))) '(?o ?O ?v ?V ?a ?A))))
(cond ((memq char '(?o ?O))) (cond ((memq char '(?o ?O)))
((memq char '(?v ?V)) ((memq char '(?v ?V))
(vlf nil filename) (vlf nil filename)
(error "")) (error ""))
((memq char '(?a ?A)) ((memq char '(?a ?A))
(error "Aborted")))))) (error "Aborted"))))))
;;; hijack `abort-if-file-too-large' ;;; hijack `abort-if-file-too-large'
;;;###autoload ;;;###autoload