diff --git a/core/core-os-osx.el b/core/core-os-osx.el index 8d3a56049..615ef8b91 100644 --- a/core/core-os-osx.el +++ b/core/core-os-osx.el @@ -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 diff --git a/core/core-os.el b/core/core-os.el index f68c0d04a..95056e866 100644 --- a/core/core-os.el +++ b/core/core-os.el @@ -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