mirror of
				https://github.com/m00natic/vlfi.git
				synced 2025-10-30 22:53:37 +00:00 
			
		
		
		
	Retry decoding when the initial attempt seems wrong.
This commit is contained in:
		| @@ -249,6 +249,15 @@ bytes added to the end." | ||||
|     (let ((coding-system-for-read coding)) | ||||
|       (decode-coding-inserted-region position (point-max) | ||||
|                                      buffer-file-name nil start end))) | ||||
|   (when (eq (detect-coding-region position (min (+ position | ||||
|                                                    vlf-sample-size) | ||||
|                                                 (point-max)) t) | ||||
|             'no-conversion) | ||||
|     (delete-region position (point-max)) | ||||
|     (insert-file-contents-literally buffer-file-name nil start end) | ||||
|     (let ((coding-system-for-read nil)) | ||||
|       (decode-coding-inserted-region position (point-max) | ||||
|                                      buffer-file-name nil start end))) | ||||
|   (setq buffer-file-coding-system last-coding-system-used)) | ||||
|  | ||||
| (defun vlf-adjust-start (start end position adjust-end) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user