Skip to content

Instantly share code, notes, and snippets.

@lclarkmichalek
Created January 22, 2012 14:52
Show Gist options
  • Select an option

  • Save lclarkmichalek/1657284 to your computer and use it in GitHub Desktop.

Select an option

Save lclarkmichalek/1657284 to your computer and use it in GitHub Desktop.

Revisions

  1. Laurie Clark-Michalek revised this gist Jan 22, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.el
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    (require 'flymake)

    (defvar go-compiler "/usr/bin/gccgo")
    (defvar go-compiler "8g")

    (defun flymake-go-init ()
    (let* ((temp-file (flymake-init-create-temp-buffer-copy
  2. Laurie Clark-Michalek created this gist Jan 22, 2012.
    15 changes: 15 additions & 0 deletions gistfile1.el
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    (require 'flymake)

    (defvar go-compiler "/usr/bin/gccgo")

    (defun flymake-go-init ()
    (let* ((temp-file (flymake-init-create-temp-buffer-copy
    'flymake-create-temp-inplace))
    (local-file (file-relative-name
    temp-file
    (file-name-directory buffer-file-name))))
    (list go-compiler (list "-o" "/dev/null" temp-file))))

    (push '(".+\\.go$" flymake-go-init) flymake-allowed-file-name-masks)

    (add-hook 'go-mode-hook 'flymake-mode)