{"action":"created","comment":{"url":"https://api.github.com/repos/phildawes/racer/pulls/comments/37725944","id":37725944,"diff_hunk":"@@ -296,27 +184,30 @@ foo(bar, |baz); -> foo|(bar, baz);\"\n     (-when-let (rust-sym (symbol-at-point))\n       (-some->>\n        ;; then look at the current completion possiblities,\n-       (racer--candidates)\n+       (racer-complete)\n        ;; extract the possibility that matches this symbol exactly\n-       (--filter (equal it (symbol-name rust-sym)))\n+       (--filter (string= it (symbol-name rust-sym)))\n        (-first-item)\n        ;; and return the prototype that Racer gave us.\n-       (get-text-property 0 'contextstr)\n+       (get-text-property 0 'ctx)\n        ;; Finally, apply syntax highlighting for the minibuffer.\n        (racer--syntax-highlight)))))\n \n-;;;###autoload\n-(defun racer-turn-on-eldoc ()\n-  \"Enable eldoc using Racer.\"\n-  (make-local-variable 'eldoc-documentation-function)\n-  (setq-local eldoc-documentation-function #'racer--eldoc)\n-  (eldoc-mode))\n-\n-;;;###autoload\n-(defun racer-turn-off-eldoc ()\n-  \"Disable eldoc using Racer.\"\n-  (kill-local-variable 'eldoc-documentation-function)\n-  (eldoc-mode -1))\n+(defvar racer-mode-map\n+  (let ((map (make-sparse-keymap)))\n+    (define-key map (kbd \"M-.\") #'racer-find-definition)\n+    map))\n+\n+(define-minor-mode racer-mode\n+  \"Minor mode for racer.\"\n+  :lighter \" racer\"\n+  :keymap racer-mode-map\n+  (setq-local eldoc-documentation-function #'racer-eldoc)\n+  (make-local-variable 'completion-at-point-functions)\n+  (add-to-list 'completion-at-point-functions #'racer-complete-at-point))\n+\n+(define-obsolete-function-alias 'racer-turn-on-eldoc 'eldoc-mode)","path":"editors/emacs/racer.el","position":383,"original_position":383,"commit_id":"4b36c98581833cf30dfd5eb55ca928e7ef0e36ab","original_commit_id":"4b36c98581833cf30dfd5eb55ca928e7ef0e36ab","user":{"login":"Wilfred","id":70800,"avatar_url":"https://avatars.githubusercontent.com/u/70800?v=3","gravatar_id":"","url":"https://api.github.com/users/Wilfred","html_url":"https://github.com/Wilfred","followers_url":"https://api.github.com/users/Wilfred/followers","following_url":"https://api.github.com/users/Wilfred/following{/other_user}","gists_url":"https://api.github.com/users/Wilfred/gists{/gist_id}","starred_url":"https://api.github.com/users/Wilfred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wilfred/subscriptions","organizations_url":"https://api.github.com/users/Wilfred/orgs","repos_url":"https://api.github.com/users/Wilfred/repos","events_url":"https://api.github.com/users/Wilfred/events{/privacy}","received_events_url":"https://api.github.com/users/Wilfred/received_events","type":"User","site_admin":false},"body":"Shouldn't this be `(define-obsolete-function-alias 'racer-turn-on-eldoc 'racer--eldoc)`?","created_at":"2015-08-24T07:46:30Z","updated_at":"2015-08-24T07:46:30Z","html_url":"https://github.com/phildawes/racer/pull/350#discussion_r37725944","pull_request_url":"https://api.github.com/repos/phildawes/racer/pulls/350","_links":{"self":{"href":"https://api.github.com/repos/phildawes/racer/pulls/comments/37725944"},"html":{"href":"https://github.com/phildawes/racer/pull/350#discussion_r37725944"},"pull_request":{"href":"https://api.github.com/repos/phildawes/racer/pulls/350"}}},"pull_request":{"url":"https://api.github.com/repos/phildawes/racer/pulls/350","id":43125442,"html_url":"https://github.com/phildawes/racer/pull/350","diff_url":"https://github.com/phildawes/racer/pull/350.diff","patch_url":"https://github.com/phildawes/racer/pull/350.patch","issue_url":"https://api.github.com/repos/phildawes/racer/issues/350","number":350,"state":"closed","locked":false,"title":"Emacs cleanup","user":{"login":"fbergroth","id":1211003,"avatar_url":"https://avatars.githubusercontent.com/u/1211003?v=3","gravatar_id":"","url":"https://api.github.com/users/fbergroth","html_url":"https://github.com/fbergroth","followers_url":"https://api.github.com/users/fbergroth/followers","following_url":"https://api.github.com/users/fbergroth/following{/other_user}","gists_url":"https://api.github.com/users/fbergroth/gists{/gist_id}","starred_url":"https://api.github.com/users/fbergroth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbergroth/subscriptions","organizations_url":"https://api.github.com/users/fbergroth/orgs","repos_url":"https://api.github.com/users/fbergroth/repos","events_url":"https://api.github.com/users/fbergroth/events{/privacy}","received_events_url":"https://api.github.com/users/fbergroth/received_events","type":"User","site_admin":false},"body":"I ended up doing quite a lot of changes, see commits for more details.\r\n\r\nSetting up `racer-mode` should be more straightforward now:\r\n```el\r\n(add-hook 'rust-mode-hook #'racer-mode)\r\n(add-hook 'racer-mode-hook #'eldoc-mode)\r\n(setq company-tooltip-align-annotations t) ; looks better\r\n```\r\nI also removed the dependency of company since completion-at-point is supported out of the box via `company-capf`.\r\nFixes #339.\r\n\r\nCheers :)","created_at":"2015-08-23T18:00:22Z","updated_at":"2015-08-24T07:46:30Z","closed_at":"2015-08-24T05:40:56Z","merged_at":"2015-08-24T05:40:56Z","merge_commit_sha":"3512de7974579715a30ad0ff7ed8c7178cf431e0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/phildawes/racer/pulls/350/commits","review_comments_url":"https://api.github.com/repos/phildawes/racer/pulls/350/comments","review_comment_url":"https://api.github.com/repos/phildawes/racer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phildawes/racer/issues/350/comments","statuses_url":"https://api.github.com/repos/phildawes/racer/statuses/4b36c98581833cf30dfd5eb55ca928e7ef0e36ab","head":{"label":"fbergroth:emacs-cleanup","ref":"emacs-cleanup","sha":"4b36c98581833cf30dfd5eb55ca928e7ef0e36ab","user":{"login":"fbergroth","id":1211003,"avatar_url":"https://avatars.githubusercontent.com/u/1211003?v=3","gravatar_id":"","url":"https://api.github.com/users/fbergroth","html_url":"https://github.com/fbergroth","followers_url":"https://api.github.com/users/fbergroth/followers","following_url":"https://api.github.com/users/fbergroth/following{/other_user}","gists_url":"https://api.github.com/users/fbergroth/gists{/gist_id}","starred_url":"https://api.github.com/users/fbergroth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbergroth/subscriptions","organizations_url":"https://api.github.com/users/fbergroth/orgs","repos_url":"https://api.github.com/users/fbergroth/repos","events_url":"https://api.github.com/users/fbergroth/events{/privacy}","received_events_url":"https://api.github.com/users/fbergroth/received_events","type":"User","site_admin":false},"repo":{"id":41208877,"name":"racer","full_name":"fbergroth/racer","owner":{"login":"fbergroth","id":1211003,"avatar_url":"https://avatars.githubusercontent.com/u/1211003?v=3","gravatar_id":"","url":"https://api.github.com/users/fbergroth","html_url":"https://github.com/fbergroth","followers_url":"https://api.github.com/users/fbergroth/followers","following_url":"https://api.github.com/users/fbergroth/following{/other_user}","gists_url":"https://api.github.com/users/fbergroth/gists{/gist_id}","starred_url":"https://api.github.com/users/fbergroth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbergroth/subscriptions","organizations_url":"https://api.github.com/users/fbergroth/orgs","repos_url":"https://api.github.com/users/fbergroth/repos","events_url":"https://api.github.com/users/fbergroth/events{/privacy}","received_events_url":"https://api.github.com/users/fbergroth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fbergroth/racer","description":"Rust Code Completion utility","fork":true,"url":"https://api.github.com/repos/fbergroth/racer","forks_url":"https://api.github.com/repos/fbergroth/racer/forks","keys_url":"https://api.github.com/repos/fbergroth/racer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fbergroth/racer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fbergroth/racer/teams","hooks_url":"https://api.github.com/repos/fbergroth/racer/hooks","issue_events_url":"https://api.github.com/repos/fbergroth/racer/issues/events{/number}","events_url":"https://api.github.com/repos/fbergroth/racer/events","assignees_url":"https://api.github.com/repos/fbergroth/racer/assignees{/user}","branches_url":"https://api.github.com/repos/fbergroth/racer/branches{/branch}","tags_url":"https://api.github.com/repos/fbergroth/racer/tags","blobs_url":"https://api.github.com/repos/fbergroth/racer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fbergroth/racer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fbergroth/racer/git/refs{/sha}","trees_url":"https://api.github.com/repos/fbergroth/racer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fbergroth/racer/statuses/{sha}","languages_url":"https://api.github.com/repos/fbergroth/racer/languages","stargazers_url":"https://api.github.com/repos/fbergroth/racer/stargazers","contributors_url":"https://api.github.com/repos/fbergroth/racer/contributors","subscribers_url":"https://api.github.com/repos/fbergroth/racer/subscribers","subscription_url":"https://api.github.com/repos/fbergroth/racer/subscription","commits_url":"https://api.github.com/repos/fbergroth/racer/commits{/sha}","git_commits_url":"https://api.github.com/repos/fbergroth/racer/git/commits{/sha}","comments_url":"https://api.github.com/repos/fbergroth/racer/comments{/number}","issue_comment_url":"https://api.github.com/repos/fbergroth/racer/issues/comments{/number}","contents_url":"https://api.github.com/repos/fbergroth/racer/contents/{+path}","compare_url":"https://api.github.com/repos/fbergroth/racer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fbergroth/racer/merges","archive_url":"https://api.github.com/repos/fbergroth/racer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fbergroth/racer/downloads","issues_url":"https://api.github.com/repos/fbergroth/racer/issues{/number}","pulls_url":"https://api.github.com/repos/fbergroth/racer/pulls{/number}","milestones_url":"https://api.github.com/repos/fbergroth/racer/milestones{/number}","notifications_url":"https://api.github.com/repos/fbergroth/racer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fbergroth/racer/labels{/name}","releases_url":"https://api.github.com/repos/fbergroth/racer/releases{/id}","created_at":"2015-08-22T13:45:37Z","updated_at":"2015-08-22T13:45:37Z","pushed_at":"2015-08-23T22:26:05Z","git_url":"git://github.com/fbergroth/racer.git","ssh_url":"git@github.com:fbergroth/racer.git","clone_url":"https://github.com/fbergroth/racer.git","svn_url":"https://github.com/fbergroth/racer","homepage":null,"size":6057,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"phildawes:master","ref":"master","sha":"09a20c43e29bf14153997279e3ea3a1c5c5f34e1","user":{"login":"phildawes","id":87502,"avatar_url":"https://avatars.githubusercontent.com/u/87502?v=3","gravatar_id":"","url":"https://api.github.com/users/phildawes","html_url":"https://github.com/phildawes","followers_url":"https://api.github.com/users/phildawes/followers","following_url":"https://api.github.com/users/phildawes/following{/other_user}","gists_url":"https://api.github.com/users/phildawes/gists{/gist_id}","starred_url":"https://api.github.com/users/phildawes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phildawes/subscriptions","organizations_url":"https://api.github.com/users/phildawes/orgs","repos_url":"https://api.github.com/users/phildawes/repos","events_url":"https://api.github.com/users/phildawes/events{/privacy}","received_events_url":"https://api.github.com/users/phildawes/received_events","type":"User","site_admin":false},"repo":{"id":17378050,"name":"racer","full_name":"phildawes/racer","owner":{"login":"phildawes","id":87502,"avatar_url":"https://avatars.githubusercontent.com/u/87502?v=3","gravatar_id":"","url":"https://api.github.com/users/phildawes","html_url":"https://github.com/phildawes","followers_url":"https://api.github.com/users/phildawes/followers","following_url":"https://api.github.com/users/phildawes/following{/other_user}","gists_url":"https://api.github.com/users/phildawes/gists{/gist_id}","starred_url":"https://api.github.com/users/phildawes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phildawes/subscriptions","organizations_url":"https://api.github.com/users/phildawes/orgs","repos_url":"https://api.github.com/users/phildawes/repos","events_url":"https://api.github.com/users/phildawes/events{/privacy}","received_events_url":"https://api.github.com/users/phildawes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phildawes/racer","description":"Rust Code Completion utility","fork":false,"url":"https://api.github.com/repos/phildawes/racer","forks_url":"https://api.github.com/repos/phildawes/racer/forks","keys_url":"https://api.github.com/repos/phildawes/racer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phildawes/racer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phildawes/racer/teams","hooks_url":"https://api.github.com/repos/phildawes/racer/hooks","issue_events_url":"https://api.github.com/repos/phildawes/racer/issues/events{/number}","events_url":"https://api.github.com/repos/phildawes/racer/events","assignees_url":"https://api.github.com/repos/phildawes/racer/assignees{/user}","branches_url":"https://api.github.com/repos/phildawes/racer/branches{/branch}","tags_url":"https://api.github.com/repos/phildawes/racer/tags","blobs_url":"https://api.github.com/repos/phildawes/racer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phildawes/racer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phildawes/racer/git/refs{/sha}","trees_url":"https://api.github.com/repos/phildawes/racer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phildawes/racer/statuses/{sha}","languages_url":"https://api.github.com/repos/phildawes/racer/languages","stargazers_url":"https://api.github.com/repos/phildawes/racer/stargazers","contributors_url":"https://api.github.com/repos/phildawes/racer/contributors","subscribers_url":"https://api.github.com/repos/phildawes/racer/subscribers","subscription_url":"https://api.github.com/repos/phildawes/racer/subscription","commits_url":"https://api.github.com/repos/phildawes/racer/commits{/sha}","git_commits_url":"https://api.github.com/repos/phildawes/racer/git/commits{/sha}","comments_url":"https://api.github.com/repos/phildawes/racer/comments{/number}","issue_comment_url":"https://api.github.com/repos/phildawes/racer/issues/comments{/number}","contents_url":"https://api.github.com/repos/phildawes/racer/contents/{+path}","compare_url":"https://api.github.com/repos/phildawes/racer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phildawes/racer/merges","archive_url":"https://api.github.com/repos/phildawes/racer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phildawes/racer/downloads","issues_url":"https://api.github.com/repos/phildawes/racer/issues{/number}","pulls_url":"https://api.github.com/repos/phildawes/racer/pulls{/number}","milestones_url":"https://api.github.com/repos/phildawes/racer/milestones{/number}","notifications_url":"https://api.github.com/repos/phildawes/racer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phildawes/racer/labels{/name}","releases_url":"https://api.github.com/repos/phildawes/racer/releases{/id}","created_at":"2014-03-03T19:57:29Z","updated_at":"2015-08-24T05:51:50Z","pushed_at":"2015-08-24T05:40:56Z","git_url":"git://github.com/phildawes/racer.git","ssh_url":"git@github.com:phildawes/racer.git","clone_url":"https://github.com/phildawes/racer.git","svn_url":"https://github.com/phildawes/racer","homepage":null,"size":6057,"stargazers_count":1030,"watchers_count":1030,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":114,"mirror_url":null,"open_issues_count":34,"forks":114,"open_issues":34,"watchers":1030,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/phildawes/racer/pulls/350"},"html":{"href":"https://github.com/phildawes/racer/pull/350"},"issue":{"href":"https://api.github.com/repos/phildawes/racer/issues/350"},"comments":{"href":"https://api.github.com/repos/phildawes/racer/issues/350/comments"},"review_comments":{"href":"https://api.github.com/repos/phildawes/racer/pulls/350/comments"},"review_comment":{"href":"https://api.github.com/repos/phildawes/racer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phildawes/racer/pulls/350/commits"},"statuses":{"href":"https://api.github.com/repos/phildawes/racer/statuses/4b36c98581833cf30dfd5eb55ca928e7ef0e36ab"}}}}