ac-anything.elを最新のauto-completeで動くようにする
パッチつくったんで貼っときます。
オリジナルは以下から持ってきてくださいです。
http://www.emacswiki.org/cgi-bin/wiki/download/ac-anything.el
さて、EmacsWikiの方を更新してもらうのと、auto-completeの自分枝でメンテするのとどっちがいいだろう。
追記
ac-anything.elを更新 - http://rubikitch.com/に移転しましたでパッチを取り込んでもらった。というわけで以下のパッチはもう不要になった。
diff --git a/ac-anything.el b/ac-anything.el index 20e1e23..642368a 100644 --- a/ac-anything.el +++ b/ac-anything.el @@ -78,10 +78,11 @@ (require 'anything) (require 'anything-match-plugin nil t) (require 'auto-complete) +(require 'pulldown) (when (require 'anything-show-completion nil t) (use-anything-show-completion 'ac-complete-with-anything - '(length ac-prefix))) + '(length (anything-attr 'ac-prefix)))) (defun ac-complete-with-anything () "Select auto-complete candidates by `anything'. @@ -93,11 +94,12 @@ It is useful to narrow candidates." (defun anything-c-auto-complete-init () (anything-attrset 'ac-candidates ac-candidates) - (anything-attrset 'menu-width (ac-menu-width ac-menu)) + (anything-attrset 'menu-width (pulldown-width ac-menu)) + (anything-attrset 'ac-prefix ac-prefix) (ac-abort)) (defun anything-c-auto-complete-action (string) - (delete-backward-char (length ac-prefix)) + (delete-backward-char (length (anything-attr 'ac-prefix))) (insert string) (prog1 (let ((action (ac-get-candidate-property 'action string))) (if action (funcall action)))