mirror of
https://github.com/m00natic/vlfi.git
synced 2025-01-31 02:00:47 +00:00
Don't apply VLF over ebrowse and TAGS databases.
This commit is contained in:
parent
4134de068f
commit
d88080f436
22
vlf.el
22
vlf.el
@ -49,6 +49,7 @@
|
|||||||
:type 'integer)
|
:type 'integer)
|
||||||
(put 'vlf-batch-size 'permanent-local t)
|
(put 'vlf-batch-size 'permanent-local t)
|
||||||
|
|
||||||
|
;;; used by the autoloaded abort-if-file-too-large advice
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defcustom vlf-application 'ask
|
(defcustom vlf-application 'ask
|
||||||
"Determines when `vlf' will be offered on opening files.
|
"Determines when `vlf' will be offered on opening files.
|
||||||
@ -175,14 +176,16 @@ You can customize number of bytes displayed by customizing
|
|||||||
(eval-after-load "dired"
|
(eval-after-load "dired"
|
||||||
'(define-key dired-mode-map "V" 'dired-vlf))
|
'(define-key dired-mode-map "V" 'dired-vlf))
|
||||||
|
|
||||||
|
;;; used by the autoloaded abort-if-file-too-large advice
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defcustom vlf-forbidden-modes-list
|
(defcustom vlf-forbidden-modes-list
|
||||||
'(archive-mode tar-mode jka-compr git-commit-mode image-mode
|
'(archive-mode tar-mode jka-compr git-commit-mode image-mode
|
||||||
doc-view-mode doc-view-mode-maybe)
|
doc-view-mode doc-view-mode-maybe ebrowse-tree-mode)
|
||||||
"Major modes which VLF will not be automatically applied to."
|
"Major modes which VLF will not be automatically applied to."
|
||||||
:group 'vlf
|
:group 'vlf
|
||||||
:type '(list symbol))
|
:type '(list symbol))
|
||||||
|
|
||||||
|
;;; used by the autoloaded abort-if-file-too-large advice
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun vlf-determine-major-mode (filename)
|
(defun vlf-determine-major-mode (filename)
|
||||||
"Determine major mode from FILENAME."
|
"Determine major mode from FILENAME."
|
||||||
@ -213,6 +216,7 @@ You can customize number of bytes displayed by customizing
|
|||||||
(cadr mode)
|
(cadr mode)
|
||||||
mode)))
|
mode)))
|
||||||
|
|
||||||
|
;;; autoload this so vlf is available as soon as file is opened
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defadvice abort-if-file-too-large (around vlf-if-file-too-large
|
(defadvice abort-if-file-too-large (around vlf-if-file-too-large
|
||||||
compile activate)
|
compile activate)
|
||||||
@ -254,6 +258,22 @@ OP-TYPE specifies the file operation being performed over FILENAME."
|
|||||||
((memq char '(?a ?A))
|
((memq char '(?a ?A))
|
||||||
(error "Aborted"))))))))
|
(error "Aborted"))))))))
|
||||||
|
|
||||||
|
;; never apply VLF over TAGS files
|
||||||
|
;;;###autoload
|
||||||
|
(eval-after-load "etags"
|
||||||
|
'(progn
|
||||||
|
(defadvice tags-verify-table (around vlf-tags-verify-table
|
||||||
|
compile activate)
|
||||||
|
"Temporarily disable `vlf-mode'."
|
||||||
|
(let ((vlf-application nil))
|
||||||
|
ad-do-it))
|
||||||
|
|
||||||
|
(defadvice tag-find-file-of-tag-noselect
|
||||||
|
(around vlf-tag-find-file-of-tag compile activate)
|
||||||
|
"Temporarily disable `vlf-mode'."
|
||||||
|
(let ((vlf-application nil))
|
||||||
|
ad-do-it))))
|
||||||
|
|
||||||
;; scroll auto batching
|
;; scroll auto batching
|
||||||
(defadvice scroll-up (around vlf-scroll-up
|
(defadvice scroll-up (around vlf-scroll-up
|
||||||
activate compile)
|
activate compile)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user