summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2015-03-27 14:10:19 +0000
committerAlan Pearce2015-03-27 14:10:19 +0000
commitfcc0e0ed5dfe88cb84a5c56d786a062f64b1d78f (patch)
treead16f6954d42f13b776021d82c29efc83f7f68ed
parent03f8973d2c839dad617868338fe918ffc3f34ecb (diff)
downloaddotfiles-fcc0e0ed5dfe88cb84a5c56d786a062f64b1d78f.tar.lz
dotfiles-fcc0e0ed5dfe88cb84a5c56d786a062f64b1d78f.tar.zst
dotfiles-fcc0e0ed5dfe88cb84a5c56d786a062f64b1d78f.zip
Emacs: Check before loading oracle-mode
-rw-r--r--tag-emacs/emacs.d/init.el9
1 files 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