Permalink
Browse files

Emacs package: Quote command arguments.

This allows using the Emacs package with file names containing shell
metacharacters.

Fixes #83

Signed-off-by: David Symonds <dsymonds@golang.org>
  • Loading branch information...
1 parent 3b3fdeb commit dea130113ab8ebacb52dbce09c9a4c92951afdca @phst phst committed with dsymonds Apr 13, 2015
Showing with 4 additions and 2 deletions.
  1. +4 −2 misc/emacs/golint.el
@@ -43,8 +43,10 @@
(defun golint ()
"Run golint on the current file and populate the fix list. Pressing C-x ` will jump directly to the line in your code which caused the first message."
(interactive)
- (compilation-start (concat "golint " buffer-file-name)
- 'golint-mode))
+ (compilation-start
+ (mapconcat #'shell-quote-argument
+ (list "golint" (expand-file-name buffer-file-name)) " ")
+ 'golint-mode))
(provide 'golint)

0 comments on commit dea1301

Please sign in to comment.