Refactor core-os*
This commit is contained in:
parent
770e38273e
commit
2dac48fb2b
2 changed files with 20 additions and 10 deletions
|
@ -24,12 +24,10 @@
|
||||||
(setenv "SHELL" "/usr/local/bin/zsh")
|
(setenv "SHELL" "/usr/local/bin/zsh")
|
||||||
;; `exec-path-from-shell' is slow, so bring out the cache
|
;; `exec-path-from-shell' is slow, so bring out the cache
|
||||||
(setq exec-path
|
(setq exec-path
|
||||||
(or (persistent-soft-fetch 'exec-path-env "osx")
|
(eval-when-compile
|
||||||
(progn
|
(require 'exec-path-from-shell)
|
||||||
(require 'exec-path-from-shell)
|
(exec-path-from-shell-initialize)
|
||||||
(exec-path-from-shell-initialize)
|
exec-path)))
|
||||||
(persistent-soft-store 'exec-path-env exec-path "osx")
|
|
||||||
exec-path))))
|
|
||||||
|
|
||||||
;; Enable mouse support in terminal
|
;; Enable mouse support in terminal
|
||||||
(unless window-system
|
(unless window-system
|
||||||
|
|
|
@ -1,11 +1,23 @@
|
||||||
;;; core-os.el
|
;;; core-os.el
|
||||||
|
|
||||||
(defun doom-open-with (&optional app-name path)
|
(defconst IS-MAC (eq system-type 'darwin))
|
||||||
(error "`doom-open-with' not implemented"))
|
(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))
|
(cond (IS-MAC (require 'core-os-osx))
|
||||||
(IS-LINUX (require 'core-os-osx))
|
(IS-LINUX (require 'core-os-linux))
|
||||||
(IS-WINDOWS (require 'core-os-osx)))
|
(IS-WINDOWS (require 'core-os-win32)))
|
||||||
|
|
||||||
(provide 'core-os)
|
(provide 'core-os)
|
||||||
;;; core-os.el ends here
|
;;; core-os.el ends here
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue