From 2f562df1fdd6f3f474d1c61d64e887fcab6a07c5 Mon Sep 17 00:00:00 2001 From: tsukimizake Date: Sat, 9 Aug 2014 15:49:20 +0900 Subject: [PATCH 1/2] Update README.md Add yas-minor-mode-on and call "auto-complete-mode" in "add-hook" , instead of "add-to-list 'd-modes" --- editors/emacs/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/editors/emacs/README.md b/editors/emacs/README.md index c01c337..2056f2d 100644 --- a/editors/emacs/README.md +++ b/editors/emacs/README.md @@ -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))) From 0f2fc68fcf842a36fbba70e7339df2e72a2df741 Mon Sep 17 00:00:00 2001 From: tsukimizake Date: Sat, 9 Aug 2014 15:59:11 +0900 Subject: [PATCH 2/2] Very little fix use value instead of hand-written literal, and move page-break. --- editors/emacs/ac-dcd.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/editors/emacs/ac-dcd.el b/editors/emacs/ac-dcd.el index 8bbe66e..66f6911 100644 --- a/editors/emacs/ac-dcd.el +++ b/editors/emacs/ac-dcd.el @@ -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