mirror of
				https://github.com/m00natic/vlfi.git
				synced 2025-10-30 22:53:37 +00:00 
			
		
		
		
	Add forgotten local variable statement and documentation.
This commit is contained in:
		
							
								
								
									
										11
									
								
								vlfi.el
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								vlfi.el
									
									
									
									
									
								
							| @@ -48,9 +48,11 @@ | |||||||
|   :group 'vlfi) |   :group 'vlfi) | ||||||
|  |  | ||||||
| ;; Keep track of file position. | ;; Keep track of file position. | ||||||
| (defvar vlfi-start-pos) | (defvar vlfi-start-pos 0 | ||||||
| (defvar vlfi-end-pos) |   "Absolute position of the visible chunk start.") | ||||||
| (defvar vlfi-file-size) | (defvar vlfi-end-pos vlfi-batch-size | ||||||
|  |   "Absolute position of the visible chunk end.") | ||||||
|  | (defvar vlfi-file-size 0 "Total size of presented file.") | ||||||
|  |  | ||||||
| (defvar vlfi-mode-map | (defvar vlfi-mode-map | ||||||
|   (let ((map (make-sparse-keymap))) |   (let ((map (make-sparse-keymap))) | ||||||
| @@ -76,8 +78,10 @@ | |||||||
|   "Mode to browse large files in." |   "Mode to browse large files in." | ||||||
|   (setq buffer-read-only t) |   (setq buffer-read-only t) | ||||||
|   (set-buffer-modified-p nil) |   (set-buffer-modified-p nil) | ||||||
|  |   (buffer-disable-undo) | ||||||
|   (make-local-variable 'vlfi-batch-size) |   (make-local-variable 'vlfi-batch-size) | ||||||
|   (make-local-variable 'vlfi-start-pos) |   (make-local-variable 'vlfi-start-pos) | ||||||
|  |   (make-local-variable 'vlfi-end-pos) | ||||||
|   (make-local-variable 'vlfi-file-size)) |   (make-local-variable 'vlfi-file-size)) | ||||||
|  |  | ||||||
| (defun vlfi-change-batch-size (decrease) | (defun vlfi-change-batch-size (decrease) | ||||||
| @@ -212,7 +216,6 @@ buffer.  You can customize number of bytes displayed by customizing | |||||||
| `vlfi-batch-size'." | `vlfi-batch-size'." | ||||||
|   (interactive "fFile to open: \nP") |   (interactive "fFile to open: \nP") | ||||||
|   (with-current-buffer (generate-new-buffer "*vlfi*") |   (with-current-buffer (generate-new-buffer "*vlfi*") | ||||||
|     (buffer-disable-undo) |  | ||||||
|     (setq buffer-file-name file |     (setq buffer-file-name file | ||||||
|           vlfi-file-size (nth 7 (file-attributes file))) |           vlfi-file-size (nth 7 (file-attributes file))) | ||||||
|     (vlfi-insert-file file from-end) |     (vlfi-insert-file file from-end) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user