Refactor core-os*

This commit is contained in:
Henrik Lissner 2016-05-23 17:12:41 -04:00
parent 770e38273e
commit 2dac48fb2b
2 changed files with 20 additions and 10 deletions

View file

@ -24,12 +24,10 @@
(setenv "SHELL" "/usr/local/bin/zsh")
;; `exec-path-from-shell' is slow, so bring out the cache
(setq exec-path
(or (persistent-soft-fetch 'exec-path-env "osx")
(progn
(require 'exec-path-from-shell)
(exec-path-from-shell-initialize)
(persistent-soft-store 'exec-path-env exec-path "osx")
exec-path))))
(eval-when-compile
(require 'exec-path-from-shell)
(exec-path-from-shell-initialize)
exec-path)))
;; Enable mouse support in terminal
(unless window-system

View file

@ -1,11 +1,23 @@
;;; core-os.el
(defun doom-open-with (&optional app-name path)
(error "`doom-open-with' not implemented"))
(defconst IS-MAC (eq system-type 'darwin))
(defconst IS-LINUX (eq system-type 'gnu/linux))
(defconst IS-WINDOWS (eq system-type 'windows-nt))
;; Stubs, these should be defined in all OS modules
(noop! doom-open-with (&optional app-name path))
(noop! os-switch-to-term)
(noop! os-switch-to-term-and-cd)
(noop! os-open-in-default-program)
(noop! os-reveal)
(noop! os-reveal-project)
(noop! os-open-in-browser)
(noop! os-upload)
(noop! os-upload-folder)
(cond (IS-MAC (require 'core-os-osx))
(IS-LINUX (require 'core-os-osx))
(IS-WINDOWS (require 'core-os-osx)))
(IS-LINUX (require 'core-os-linux))
(IS-WINDOWS (require 'core-os-win32)))
(provide 'core-os)
;;; core-os.el ends here