Fix dash//activate-package-docsets when using counsel-dash

When counsel-dash is installed, but helm-dash isn't, startup error
(void-function dash-docs-installed-docsets) will be triggered.

Since common functionality of both counsel-dash and helm-dash was refactored
into dash-docs, a standalone package, the layer code was updated to use the
variables and functions from that package. This also fixed the mentioned error.
This commit is contained in:
madand 2019-05-29 20:18:18 +03:00 committed by duianto
parent 4610076709
commit a281e6979f
2 changed files with 7 additions and 4 deletions

View File

@ -1216,6 +1216,9 @@ Other:
**** Dash
- Improvements:
- Use default docsets path in =helm-dash= on macos (thanks to ColorFuzzy)
- Fixes:
- Fix startup error when using counsel-dash with custom path in
helm-dash-docset-newpath (thanks to madand)
**** Deft
- Key bindings:
- ~SPC m c~ clear deft filter (thanks to Bahtiar Gadimov)

View File

@ -10,11 +10,11 @@
(defun dash//activate-package-docsets (path)
"Add dash docsets from specified PATH."
(if (not (string-blank-p path))
(setq helm-dash-docsets-path path))
(setq helm-dash-common-docsets (helm-dash-installed-docsets))
(when (not (string-blank-p path))
(setq dash-docs-docsets-path (expand-file-name path)))
(setq dash-docs-common-docsets (dash-docs-installed-docsets))
(message (format "activated %d docsets from: %s"
(length helm-dash-common-docsets) path)))
(length dash-docs-common-docsets) path)))
(defun counsel-dash-at-point ()
"Counsel dash with selected point"