X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/70c7850e9c7001512df5b247bed197590355011d..66236b772af493888a34148662dca58561958a6f:/lisp/jka-compr.el diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el index 0ee24e94c6..fc53a0b329 100644 --- a/lisp/jka-compr.el +++ b/lisp/jka-compr.el @@ -520,16 +520,10 @@ There should be no more than seven characters after the final `/'." ;; don't do that conversion. (and (null enable-multibyte-characters) 'raw-text) - (let ((tail file-coding-system-alist) - (newfile - (jka-compr-byte-compiler-base-file-name file)) - result) - (while tail - (if (string-match (car (car tail)) newfile) - (setq result (car (cdr (car tail))) - tail nil)) - (setq tail (cdr tail))) - result) + (let ((coding (find-operation-coding-system + 'insert-file-contents + (jka-compr-byte-compiler-base-file-name file)))) + (and (consp coding) (car coding))) 'undecided)) ) (setq local-file (or local-copy filename)) @@ -613,18 +607,22 @@ There should be no more than seven characters after the final `/'." (signal 'file-error (cons "Opening input file" (nth 2 notfound)))) - ;; Run the functions that insert-file-contents would. - (let ((p after-insert-file-functions) - (insval size)) - (while p - (setq insval (funcall (car p) size)) - (if insval - (progn - (or (integerp insval) - (signal 'wrong-type-argument - (list 'integerp insval))) - (setq size insval))) - (setq p (cdr p)))) + ;; This is done in insert-file-contents after we return. + ;; That is a little weird, but better to go along with it now + ;; than to change it now. + +;;; ;; Run the functions that insert-file-contents would. +;;; (let ((p after-insert-file-functions) +;;; (insval size)) +;;; (while p +;;; (setq insval (funcall (car p) size)) +;;; (if insval +;;; (progn +;;; (or (integerp insval) +;;; (signal 'wrong-type-argument +;;; (list 'integerp insval))) +;;; (setq size insval))) +;;; (setq p (cdr p)))) (list filename size))