branch: elpa/helm commit 9d6cf3fbc49d15438a23475523aa0e39d7e297b1 Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Make locate-library caches private --- helm-elisp.el | 12 ++++++------ helm-mode.el | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/helm-elisp.el b/helm-elisp.el index a9c0377050..2b9ec6a7ce 100644 --- a/helm-elisp.el +++ b/helm-elisp.el @@ -902,8 +902,8 @@ a string, i.e. the `symbol-name' of any existing symbol." ;;; Locate elisp library ;; ;; -(defvar helm-locate-library-cache nil) -(defvar helm-locate-library-doc-cache (make-hash-table :test 'equal)) +(defvar helm--locate-library-cache nil) +(defvar helm--locate-library-doc-cache (make-hash-table :test 'equal)) (defun helm-locate-library-scan-list () (cl-loop for dir in load-path with load-suffixes = (find-library-suffixes) @@ -928,13 +928,13 @@ a string, i.e. the `symbol-name' of any existing symbol." (length c))) ? ) for bn = (helm-basename (helm-basename c t) t) - for path = (or (assoc-default bn helm-locate-library-cache) + for path = (or (assoc-default bn helm--locate-library-cache) (let ((p (find-library-name bn))) - (push (cons bn p) helm-locate-library-cache) + (push (cons bn p) helm--locate-library-cache) p)) - for doc = (or (gethash bn helm-locate-library-doc-cache) + for doc = (or (gethash bn helm--locate-library-doc-cache) (puthash bn (helm-locate-lib-get-summary path) - helm-locate-library-doc-cache)) + helm--locate-library-doc-cache)) for disp = (helm-aand (propertize doc 'face 'font-lock-warning-face) (propertize " " 'display (concat sep it)) (concat bn it)) diff --git a/helm-mode.el b/helm-mode.el index c1d1c8eeaf..1ce8498e11 100644 --- a/helm-mode.el +++ b/helm-mode.el @@ -1281,13 +1281,13 @@ is used." (let* ((sep (make-string (1+ (- (helm-in-buffer-get-longest-candidate) (length comp))) ? )) - (path (or (assoc-default comp helm-locate-library-cache) + (path (or (assoc-default comp helm--locate-library-cache) (let ((p (find-library-name comp))) - (push (cons comp p) helm-locate-library-cache) + (push (cons comp p) helm--locate-library-cache) p))) - (doc (or (gethash comp helm-locate-library-doc-cache) + (doc (or (gethash comp helm--locate-library-doc-cache) (puthash comp (helm-locate-lib-get-summary path) - helm-locate-library-doc-cache)))) + helm--locate-library-doc-cache)))) (list comp "" (helm-aand (propertize doc 'face 'font-lock-warning-face)