Merge pull request #154 from tsukimizake/master
Update emacs integration
This commit is contained in:
commit
043b32357d
|
@ -2,7 +2,7 @@
|
|||
|
||||
##Requirements
|
||||
* You must have the [auto-complete](https://github.com/auto-complete/auto-complete) package.
|
||||
[yasnippet](https://github.com/capitaomorte/yasnippet) and [popwin](https://github.com/m2ym/popwin-el) is recommended.
|
||||
And, [yasnippet](https://github.com/capitaomorte/yasnippet) and [popwin](https://github.com/m2ym/popwin-el) is recommended.
|
||||
* Make sure dcd-client and dcd-server is in your exec-path. Otherwise, please set the variable ```dcd-exectutable``` and ```dcd-server-executable``` using ```M-x customize```.
|
||||
|
||||
## Setup
|
||||
|
@ -13,10 +13,11 @@
|
|||
;;; ac-dcd
|
||||
(add-to-list 'load-path "path_to_ac-dcd.el")
|
||||
(require 'ac-dcd)
|
||||
(add-to-list 'ac-modes 'd-mode)
|
||||
|
||||
(add-hook 'd-mode-hook
|
||||
'(lambda () "set up ac-dcd"
|
||||
(auto-complete-mode t)
|
||||
(yas-minor-mode-on)
|
||||
(ac-dcd-maybe-start-server)
|
||||
(add-to-list 'ac-sources 'ac-source-dcd)))
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ If you want to restart server, use `ac-dcd-init-server' instead."
|
|||
(defun ac-dcd-call-process (prefix args)
|
||||
(if (null ac-dcd-executable)
|
||||
(error (format "Could not find dcd-client executable"))
|
||||
(let ((buf (get-buffer-create "*dcd-output*"))
|
||||
(let ((buf (get-buffer-create ac-dcd-output-buffer-name))
|
||||
res)
|
||||
(with-current-buffer buf (erase-buffer))
|
||||
(setq res (apply 'call-process-region (point-min) (point-max)
|
||||
|
@ -501,6 +501,7 @@ so I have to replace it with struct name."
|
|||
(goto-char (point-min))
|
||||
(forward-char (string-to-number offset))))))))
|
||||
|
||||
|
||||
;; utilities for goto-definition
|
||||
|
||||
(defun ac-dcd-call-process-for-symbol-declaration (pos)
|
||||
|
@ -530,7 +531,7 @@ output is just like following.\n
|
|||
(cons (match-string 1) (match-string 2)))
|
||||
(cons nil nil)))
|
||||
))
|
||||
|
||||
|
||||
|
||||
(provide 'ac-dcd)
|
||||
;;; ac-dcd.el ends here
|
||||
|
|
Loading…
Reference in New Issue