]> code.delx.au - gnu-emacs/blobdiff - lisp/jka-compr.el
Comment fix.
[gnu-emacs] / lisp / jka-compr.el
index 0ee24e94c66b53c9e5613c9347cc1d1659744899..fc53a0b329a55331302d4605954ffd860a5ec4de 100644 (file)
@@ -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))