]> code.delx.au - gnu-emacs/blobdiff - lisp/jka-compr.el
*** empty log message ***
[gnu-emacs] / lisp / jka-compr.el
index a3fae5b05bc2eb8af3a5dd3515e8c5ed714a002a..7539ef9999cd36f78c60df33df41d376f86159a7 100644 (file)
@@ -142,7 +142,7 @@ for `jka-compr-compression-info-list')."
      "zipping"        "gzip"         ("-c" "-q")
      "unzipping"      "gzip"         ("-c" "-q" "-d")
      t nil "\037\213"]
-    ["\\.gz\\(~\\|\\.~[0-9]+~\\)?\\'"
+    ["\\.g?z\\(~\\|\\.~[0-9]+~\\)?\\'"
      "zipping"        "gzip"         ("-c" "-q")
      "unzipping"      "gzip"         ("-c" "-q" "-d")
      t t "\037\213"])
@@ -704,9 +704,14 @@ There should be no more than seven characters after the final `/'."
 
          (let ((load-force-doc-strings t))
            (load load-file noerror t t))
-
          (or nomessage
-             (message "Loading %s...done." file)))
+             (message "Loading %s...done." file))
+         ;; Fix up the load history to point at the right library.
+         (let ((l (assoc load-file load-history)))
+           ;; Remove .gz and .elc?.
+           (while (file-name-extension file)
+             (setq file (file-name-sans-extension file)))
+           (setcar l file)))
 
       (jka-compr-delete-temp-file local-copy))