;;; init-dash.el --- Integrate with the Mac app "Dash" -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:

;; 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)
;;; init-dash.el ends here

;;; init-dash.el --- Integrate with the Mac app "Dash" -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:

;; Support for the http://kapeli.com/dash documentation browser

(when *is-a-mac*
  (require-package 'dash-at-point)
  (global-set-key (kbd "C-c D") 'dash-at-point))

(provide 'init-dash)
;;; init-dash.el ends here

Install dash-at-point unconditionally on MacOS
Install dash-at-point unconditionally on MacOS

Closes #691

cjqw/emacs.d,gsmlg/emacs.d,svenyurgensson/emacs.d,blueabysm/emacs.d,wegatron/emacs.d,emuio/emacs.d,purcell/emacs.d,kongfy/emacs.d,benkha/emacs.d,braveoyster/emacs.d,mmqmzk/emacs.d,arthurl/emacs.d,dcorking/emacs.d,krzysz00/emacs.d,sgarciac/emacs.d,blueseason/emacs.d,baohaojun/emacs.d,lust4life/emacs.d,qianwan/emacs.d