changeset 12922:e171a85fd6b0

(jka-compr-byte-compiler-base-file-name): New function. Use it to handle byte-compiler-base-file-name operation.
author Richard M. Stallman <rms@gnu.org>
date Tue, 22 Aug 1995 16:46:45 +0000
parents ed1abc9d781b
children f1e05398634b
files lisp/jka-compr.el
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/jka-compr.el	Tue Aug 22 00:32:03 1995 +0000
+++ b/lisp/jka-compr.el	Tue Aug 22 16:46:45 1995 +0000
@@ -633,11 +633,20 @@
       (jka-compr-delete-temp-file local-copy))
 
     t))
+
+(defun jka-compr-byte-compiler-base-file-name (file)
+  (let ((info (jka-compr-get-compression-info file)))
+    (if (and info (jka-compr-info-strip-extension info))
+	(save-match-data
+	  (substring file 0 (string-match (jka-compr-info-regexp info) file)))
+      file)))
 
 (put 'write-region 'jka-compr 'jka-compr-write-region)
 (put 'insert-file-contents 'jka-compr 'jka-compr-insert-file-contents)
 (put 'file-local-copy 'jka-compr 'jka-compr-file-local-copy)
 (put 'load 'jka-compr 'jka-compr-load)
+(put 'byte-compiler-base-file-name 'jka-compr
+     'jka-compr-byte-compiler-base-file-name)
 
 (defun jka-compr-handler (operation &rest args)
   (save-match-data