forked from purcell/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-dash.el
20 lines (16 loc) · 827 Bytes
/
init-dash.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
;; Support for the http://kapeli.com/dash documentation browser
(defun sanityinc/dash-installed-p ()
"Return t if Dash is installed on this machine, or nil otherwise."
(let ((lsregister "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister"))
(and (file-executable-p lsregister)
(not (string-equal
""
(shell-command-to-string
(concat lsregister " -dump|grep com.kapeli.dash")))))))
(when (and *is-a-mac* (not (package-installed-p 'dash-at-point)))
(message "Checking whether Dash is installed")
(when (sanityinc/dash-installed-p)
(require-package 'dash-at-point)))
(when (package-installed-p 'dash-at-point)
(global-set-key (kbd "C-c D") 'dash-at-point))
(provide 'init-dash)