From fcc0e0ed5dfe88cb84a5c56d786a062f64b1d78f Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 27 Mar 2015 14:10:19 +0000 Subject: Emacs: Check before loading oracle-mode --- tag-emacs/emacs.d/init.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 39f7b53..355e6a0 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -879,10 +879,11 @@ mouse-1: Display Line and Column Mode Menu")))))) (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 -- cgit 1.4.1