{"action":"opened","number":79,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust-mode/pulls/79","id":38514000,"html_url":"https://github.com/rust-lang/rust-mode/pull/79","diff_url":"https://github.com/rust-lang/rust-mode/pull/79.diff","patch_url":"https://github.com/rust-lang/rust-mode/pull/79.patch","issue_url":"https://api.github.com/repos/rust-lang/rust-mode/issues/79","number":79,"state":"open","locked":false,"title":"Match angle brackets syntactically","user":{"login":"MicahChalmer","id":698400,"avatar_url":"https://avatars.githubusercontent.com/u/698400?v=3","gravatar_id":"","url":"https://api.github.com/users/MicahChalmer","html_url":"https://github.com/MicahChalmer","followers_url":"https://api.github.com/users/MicahChalmer/followers","following_url":"https://api.github.com/users/MicahChalmer/following{/other_user}","gists_url":"https://api.github.com/users/MicahChalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/MicahChalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MicahChalmer/subscriptions","organizations_url":"https://api.github.com/users/MicahChalmer/orgs","repos_url":"https://api.github.com/users/MicahChalmer/repos","events_url":"https://api.github.com/users/MicahChalmer/events{/privacy}","received_events_url":"https://api.github.com/users/MicahChalmer/received_events","type":"User","site_admin":false},"body":"Remove the angle bracket blinking feature, and make it actually match `<` and `>` characters as parens in the syntax table instead.  This matching is suppressed as needed, so that less-than and greater-than operators, arrow operators, etc don't throw off the matches.\r\n\r\nThis has the following effects:\r\n\r\n  * Angle brackets match like other braces/parens however they are configured, rather than blinking in a different way.\r\n  * Movement commands like `forward-sexp` and `backward-up-list` acknowledge angle brackets.\r\n  * `electric-pair-mode` works with angle brackets (also suppressed when needed.)\r\n  * Fix #50 - angle brackets are matched in the right pairs; `->` and other non-angle-bracket `<` and `>` characters do not attempt to match.\r\n  * Fix #10 - multi-line lists inside angle brackets are indented like other lists.\r\n\r\nMacros have arbitrary syntax and therefore it's not possible to know whether a `<` or `>` character is an angle bracket or not.  So the matching is always suppressed inside macro definitions and uses.\r\n\r\nThere are a few disadvantages: besides the fact that the code is rather hairy, it also has to detect the non-angle-brackets perfectly, or else it throws off the indentation for the whole rest of the file.  For that reason there is still a custom variable available to disable it (though with a different name than the previous one.)\r\n\r\nHaving said that, I don't know of any cases where it gets it wrong.  I tested it with [this program](https://gist.github.com/MicahChalmer/1ac9f8de543655e577a1), which compares what emacs thinks are the non-bracket `<`/`>` characters with what the rust compiler thinks.  It passed for all of the rust compiler code base, as well as all the rust code in servo and as many of servo's dependencies as still compile with the latest nightly.\r\n\r\nAlso included are some bug fixes for some edge case issues in the handling of raw strings and character literals.  I found these while running the test script.  Even if the angle bracket matching itself is deemed to be too risky or hairy to be merged (and I would understand it if that turns out to be the case), you may want to merge the other commits for the bug fixes.  I've put them first to make this easy.\r\n\r\nIf this PR is accepted, close #66 (because the variable that it renames has been removed entirely) and close #74 (because post-self-insert-hook is no longer used at all.)  Both of these pertain to the old angle bracket blinking code that this PR removes entirely.\r\n\r\nAnd if the PR is not accepted - hey, I still had fun writing it.","created_at":"2015-06-25T05:50:27Z","updated_at":"2015-06-25T05:50:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust-mode/pulls/79/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust-mode/pulls/79/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rust-mode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang/rust-mode/issues/79/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust-mode/statuses/2fd4641e412626f3cce97e74fb4ca0fa754527bb","head":{"label":"MicahChalmer:angle-bracket-madness","ref":"angle-bracket-madness","sha":"2fd4641e412626f3cce97e74fb4ca0fa754527bb","user":{"login":"MicahChalmer","id":698400,"avatar_url":"https://avatars.githubusercontent.com/u/698400?v=3","gravatar_id":"","url":"https://api.github.com/users/MicahChalmer","html_url":"https://github.com/MicahChalmer","followers_url":"https://api.github.com/users/MicahChalmer/followers","following_url":"https://api.github.com/users/MicahChalmer/following{/other_user}","gists_url":"https://api.github.com/users/MicahChalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/MicahChalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MicahChalmer/subscriptions","organizations_url":"https://api.github.com/users/MicahChalmer/orgs","repos_url":"https://api.github.com/users/MicahChalmer/repos","events_url":"https://api.github.com/users/MicahChalmer/events{/privacy}","received_events_url":"https://api.github.com/users/MicahChalmer/received_events","type":"User","site_admin":false},"repo":{"id":30172000,"name":"rust-mode","full_name":"MicahChalmer/rust-mode","owner":{"login":"MicahChalmer","id":698400,"avatar_url":"https://avatars.githubusercontent.com/u/698400?v=3","gravatar_id":"","url":"https://api.github.com/users/MicahChalmer","html_url":"https://github.com/MicahChalmer","followers_url":"https://api.github.com/users/MicahChalmer/followers","following_url":"https://api.github.com/users/MicahChalmer/following{/other_user}","gists_url":"https://api.github.com/users/MicahChalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/MicahChalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MicahChalmer/subscriptions","organizations_url":"https://api.github.com/users/MicahChalmer/orgs","repos_url":"https://api.github.com/users/MicahChalmer/repos","events_url":"https://api.github.com/users/MicahChalmer/events{/privacy}","received_events_url":"https://api.github.com/users/MicahChalmer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MicahChalmer/rust-mode","description":"Emacs configuration for Rust","fork":true,"url":"https://api.github.com/repos/MicahChalmer/rust-mode","forks_url":"https://api.github.com/repos/MicahChalmer/rust-mode/forks","keys_url":"https://api.github.com/repos/MicahChalmer/rust-mode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MicahChalmer/rust-mode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MicahChalmer/rust-mode/teams","hooks_url":"https://api.github.com/repos/MicahChalmer/rust-mode/hooks","issue_events_url":"https://api.github.com/repos/MicahChalmer/rust-mode/issues/events{/number}","events_url":"https://api.github.com/repos/MicahChalmer/rust-mode/events","assignees_url":"https://api.github.com/repos/MicahChalmer/rust-mode/assignees{/user}","branches_url":"https://api.github.com/repos/MicahChalmer/rust-mode/branches{/branch}","tags_url":"https://api.github.com/repos/MicahChalmer/rust-mode/tags","blobs_url":"https://api.github.com/repos/MicahChalmer/rust-mode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MicahChalmer/rust-mode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MicahChalmer/rust-mode/git/refs{/sha}","trees_url":"https://api.github.com/repos/MicahChalmer/rust-mode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MicahChalmer/rust-mode/statuses/{sha}","languages_url":"https://api.github.com/repos/MicahChalmer/rust-mode/languages","stargazers_url":"https://api.github.com/repos/MicahChalmer/rust-mode/stargazers","contributors_url":"https://api.github.com/repos/MicahChalmer/rust-mode/contributors","subscribers_url":"https://api.github.com/repos/MicahChalmer/rust-mode/subscribers","subscription_url":"https://api.github.com/repos/MicahChalmer/rust-mode/subscription","commits_url":"https://api.github.com/repos/MicahChalmer/rust-mode/commits{/sha}","git_commits_url":"https://api.github.com/repos/MicahChalmer/rust-mode/git/commits{/sha}","comments_url":"https://api.github.com/repos/MicahChalmer/rust-mode/comments{/number}","issue_comment_url":"https://api.github.com/repos/MicahChalmer/rust-mode/issues/comments{/number}","contents_url":"https://api.github.com/repos/MicahChalmer/rust-mode/contents/{+path}","compare_url":"https://api.github.com/repos/MicahChalmer/rust-mode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MicahChalmer/rust-mode/merges","archive_url":"https://api.github.com/repos/MicahChalmer/rust-mode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MicahChalmer/rust-mode/downloads","issues_url":"https://api.github.com/repos/MicahChalmer/rust-mode/issues{/number}","pulls_url":"https://api.github.com/repos/MicahChalmer/rust-mode/pulls{/number}","milestones_url":"https://api.github.com/repos/MicahChalmer/rust-mode/milestones{/number}","notifications_url":"https://api.github.com/repos/MicahChalmer/rust-mode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MicahChalmer/rust-mode/labels{/name}","releases_url":"https://api.github.com/repos/MicahChalmer/rust-mode/releases{/id}","created_at":"2015-02-02T05:05:23Z","updated_at":"2015-02-24T01:29:09Z","pushed_at":"2015-06-25T05:03:04Z","git_url":"git://github.com/MicahChalmer/rust-mode.git","ssh_url":"git@github.com:MicahChalmer/rust-mode.git","clone_url":"https://github.com/MicahChalmer/rust-mode.git","svn_url":"https://github.com/MicahChalmer/rust-mode","homepage":null,"size":452,"stargazers_count":0,"watchers_count":0,"language":"Emacs Lisp","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":"rust-lang:master","ref":"master","sha":"5ed467549abe81415241b0ea45e2ae87584b588c","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":30004263,"name":"rust-mode","full_name":"rust-lang/rust-mode","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rust-mode","description":"Emacs configuration for Rust","fork":false,"url":"https://api.github.com/repos/rust-lang/rust-mode","forks_url":"https://api.github.com/repos/rust-lang/rust-mode/forks","keys_url":"https://api.github.com/repos/rust-lang/rust-mode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rust-mode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rust-mode/teams","hooks_url":"https://api.github.com/repos/rust-lang/rust-mode/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rust-mode/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rust-mode/events","assignees_url":"https://api.github.com/repos/rust-lang/rust-mode/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rust-mode/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rust-mode/tags","blobs_url":"https://api.github.com/repos/rust-lang/rust-mode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rust-mode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rust-mode/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rust-mode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rust-mode/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rust-mode/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rust-mode/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rust-mode/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rust-mode/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rust-mode/subscription","commits_url":"https://api.github.com/repos/rust-lang/rust-mode/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rust-mode/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rust-mode/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rust-mode/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang/rust-mode/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rust-mode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rust-mode/merges","archive_url":"https://api.github.com/repos/rust-lang/rust-mode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rust-mode/downloads","issues_url":"https://api.github.com/repos/rust-lang/rust-mode/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rust-mode/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rust-mode/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rust-mode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rust-mode/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rust-mode/releases{/id}","created_at":"2015-01-29T04:53:17Z","updated_at":"2015-06-20T17:19:38Z","pushed_at":"2015-06-21T00:51:28Z","git_url":"git://github.com/rust-lang/rust-mode.git","ssh_url":"git@github.com:rust-lang/rust-mode.git","clone_url":"https://github.com/rust-lang/rust-mode.git","svn_url":"https://github.com/rust-lang/rust-mode","homepage":null,"size":851,"stargazers_count":58,"watchers_count":58,"language":"Emacs Lisp","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":23,"forks":21,"open_issues":23,"watchers":58,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust-mode/pulls/79"},"html":{"href":"https://github.com/rust-lang/rust-mode/pull/79"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust-mode/issues/79"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust-mode/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust-mode/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rust-mode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rust-mode/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust-mode/statuses/2fd4641e412626f3cce97e74fb4ca0fa754527bb"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":1298,"deletions":175,"changed_files":2}}