Emacs: Check before loading oracle-mode
Alan Pearce alan@alanpearce.co.uk
Fri, 27 Mar 2015 14:10:19 +0000
1 files changed, 5 insertions(+), 4 deletions(-)
jump to
M tag-emacs/emacs.d/init.el → tag-emacs/emacs.d/init.el
@@ -879,10 +879,11 @@ (req-package go-mode :mode (("\\.go\\'" . go-mode))) -(req-package oracle - :load-path ,(expand-file-name "src/code.google.com/p/go.tools/cmd/oracle/oracle.el" (getenv "GOPATH")) - :init (progn - (add-hook 'go-mode-hook #'go-oracle-mode))) +(when (file-exists-p "src/code.google.com/p/go.tools/cmd/oracle/oracle.el") + (req-package oracle + :load-path ,(expand-file-name "src/code.google.com/p/go.tools/cmd/oracle/oracle.el" (getenv "GOPATH")) + :init (progn + (add-hook 'go-mode-hook #'go-oracle-mode)))) (req-package company-go :require go-mode