summaryrefslogtreecommitdiff
path: root/helm-info.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2015-03-15 18:08:48 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2015-03-15 18:08:48 +0100
commite5d5ce426a253e585818a1f43850986fbaf69aa5 (patch)
tree1d320e789dd4ca6ac007f38c19d8a40ad01f0aeb /helm-info.el
parent416e29120f4ac0e07298f813f683ed77d8316a42 (diff)
* helm-info.el (helm-info--pages-cache): Renamed from helm-info-pages.
Diffstat (limited to 'helm-info.el')
-rw-r--r--helm-info.el14
1 files changed, 6 insertions, 8 deletions
diff --git a/helm-info.el b/helm-info.el
index bd742204..ef6b159d 100644
--- a/helm-info.el
+++ b/helm-info.el
@@ -140,15 +140,13 @@ Where NAME is one of `helm-default-info-index-list'."
;;; Info pages
-(defvar helm-info-pages nil
- "All info pages on system.
-Will be calculated the first time you invoke helm with this
-source.")
+(defvar helm-info--pages-cache nil
+ "Cache for all info pages on system.")
(defun helm-info-pages-init ()
"Collect candidates for initial Info node Top."
- (if helm-info-pages
- helm-info-pages
+ (if helm-info--pages-cache
+ helm-info--pages-cache
(let ((info-topic-regexp "\\* +\\([^:]+: ([^)]+)[^.]*\\)\\.")
topics)
(require 'info)
@@ -158,12 +156,12 @@ source.")
(while (re-search-forward info-topic-regexp nil t)
(push (match-string-no-properties 1) topics))
(kill-buffer))
- (setq helm-info-pages topics))))
+ (setq helm-info--pages-cache topics))))
(defvar helm-source-info-pages
(helm-build-sync-source "Info Pages"
:init #'helm-info-pages-init
- :candidates (lambda () helm-info-pages)
+ :candidates (lambda () helm-info--pages-cache)
:action '(("Show with Info" .(lambda (node-str)
(info (replace-regexp-in-string
"^[^:]+: " "" node-str)))))