Skip to content

Commit

Permalink
emacs mode: fix env of process call for OSX, rebind print-type to C-c…
Browse files Browse the repository at this point in the history
… C-t

Thanks @dbuenzli. Closes #26, #28
  • Loading branch information
AltGr committed Jan 15, 2014
1 parent ab364ed commit 89d805b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tools/ocp-index.el
Expand Up @@ -95,11 +95,12 @@
cmd))

(defun ocp-index-run (cmd &rest args)
(let ((args (apply 'ocp-index-args cmd args)))
(let* ((args (apply 'ocp-index-args cmd args))
(shell-cmd (mapconcat 'identity (list* ocp-index-path args) " ")))
(with-output-to-string
(apply 'call-process-region (point-min) (point) ocp-index-path
(apply 'call-process-region (point-min) (point) shell-file-name
nil (list standard-output nil) nil
args))))
(list shell-command-switch shell-cmd)))))

(defun ac-ocp-index-candidates ()
(let* ((output (ocp-index-run "complete" "--sexp" ac-prefix))
Expand Down Expand Up @@ -201,7 +202,7 @@

(defvar ocp-index-keymap
(let ((map (make-sparse-keymap)))
(define-key map (kbd "C-c t") 'ocp-index-print-type-at-point)
(define-key map (kbd "C-c C-t") 'ocp-index-print-type-at-point)
(define-key map (kbd "C-c ;") 'ocp-index-jump-to-definition-at-point-other-window)
(define-key map (kbd "C-c :") 'ocp-index-jump-to-sig-at-point-other-window)
(define-key map (kbd "C-c C-;") 'ocp-index-jump-to-definition-at-point)
Expand Down

0 comments on commit 89d805b

Please sign in to comment.