# HG changeset patch # User Augie Fackler # Date 1339793031 18000 # Node ID e00b1960347231c3b3603f1895bce47c1d8b9a58 # Parent 5d83e487611c79b2acb9f9bebfe2f9ee2c8a085e go.el: Fix some bugs exposed on a new machine. diff --git a/.elisp/settings/80.go.el b/.elisp/settings/80.go.el --- a/.elisp/settings/80.go.el +++ b/.elisp/settings/80.go.el @@ -9,15 +9,19 @@ (defun af-get-go-elisp-location () (let* ((gobinary (shell-command-to-string "which go")) - (gobin (substring (file-name-directory gobinary) 0 -1)) + (gobin (substring (let ((x (file-name-directory gobinary))) + (if x x "z")) 0 -1)) (goroot (file-name-directory gobin))) - (concat goroot "misc/emacs"))) + (if goroot (concat goroot "misc/emacs") ""))) (defun af-get-gocode-elisp-location () (let* ((binary (shell-command-to-string "which gocode")) - (bin (substring (file-name-directory binary) 0 -1)) + (bin (substring (let ((x (file-name-directory binary))) + (if x x "z")) 0 -1)) (basedir (file-name-directory bin))) - (concat basedir "src/github.com/nsf/gocode/emacs-company/"))) + (if basedir + (concat basedir "src/github.com/nsf/gocode/emacs-company/") + ""))) (let* ((goloc (af-get-go-elisp-location)) (goel (concat goloc "/go-mode.el")))