From 894a1f334895da7acb549f2a42bbd7edafc13716 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Wed, 17 Dec 2014 03:23:07 +0200 Subject: [PATCH] Speed up package--list-loaded-files a bit Fixes: debbugs:19390 * lisp/emacs-lisp/package.el (package--list-loaded-files): Don't call file-truename on load-history elements. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/package.el | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f28dd6d449f..035f476aa80 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-17 Dmitry Gutov + + * emacs-lisp/package.el (package--list-loaded-files): Don't call + file-truename on load-history elements (bug#19390). + 2014-12-16 Nicolas Petton * emacs-lisp/seq.el: New file. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index cd948ae8184..60beebd8a5f 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -559,8 +559,7 @@ Return the max version (as a string) if the package is held at a lower version." "Recursively list all files in DIR which correspond to loaded features. Returns the `file-name-sans-extension' of each file, relative to DIR, sorted by most recently loaded last." - (let* ((history (mapcar (lambda (x) (file-name-sans-extension - (file-truename (car x)))) + (let* ((history (mapcar (lambda (x) (file-name-sans-extension (car x))) load-history)) (dir (file-truename dir)) ;; List all files that have already been loaded. -- 2.39.2