From 6a801864b18fb130aff93bab09c54a6d454bfc34 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 22 Jan 2010 12:23:25 +0200 Subject: [PATCH] Fix bug #5447, whereby loading C:/foo.el.gz on MS-Windows would fail. jka-compr.el (jka-compr-load): If load-file is not in load-history, try its file-truename version. --- lisp/ChangeLog | 5 +++++ lisp/jka-compr.el | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a308a571874..1dc503e2bd6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-01-22 Eli Zaretskii + + * jka-compr.el (jka-compr-load): If load-file is not in + load-history, try its file-truename version. (bug#5447) + 2010-01-21 Alan Mackenzie Fix a situation where deletion of a cpp construct throws an error. diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el index 12f48bd96b1..34ffcc90a76 100644 --- a/lisp/jka-compr.el +++ b/lisp/jka-compr.el @@ -590,7 +590,14 @@ There should be no more than seven characters after the final `/'." (or nomessage (message "Loading %s...done." file)) ;; Fix up the load history to point at the right library. - (let ((l (assoc load-file load-history))) + (let ((l (or (assoc load-file load-history) + ;; On MS-Windows, if load-file is in + ;; temporary-file-directory, it will look like + ;; "c:/DOCUME~1/USER/LOCALS~1/foo", whereas + ;; readevalloop will record its truename in + ;; load-history. Therefore try truename if the + ;; original name is not in load-history. + (assoc (file-truename load-file) load-history)))) ;; Remove .gz and .elc?. (while (file-name-extension file) (setq file (file-name-sans-extension file))) -- 2.39.5