{"action":"created","comment":{"url":"https://api.github.com/repos/defunkt/coffee-mode/pulls/comments/49218947","id":49218947,"diff_hunk":"@@ -1197,6 +1197,38 @@ comments such as the following:\n      (0 (ignore (coffee-syntax-propertize-block-comment)))))\n    (point) end))\n \n+(defun coffee-get-comment-info ()\n+  (let* ((syntax (syntax-ppss))\n+         (commentp (nth 4 syntax))\n+         (comment-start (nth 8 syntax)))\n+    (when commentp\n+      (save-excursion\n+        (if (string=\n+             \"###\" (buffer-substring (- comment-start 2) (1+ comment-start)))\n+            (list :type 'multiple-line :start (- comment-start 2))\n+          (list :type 'single-line :start comment-start))))))\n+\n+(defun coffee-comment-line-break-fn (&optional _)\n+  (let ((comment-type (plist-get (coffee-get-comment-info) :type)))\n+    (comment-indent-new-line)\n+    (cond ((eq comment-type 'multiple-line)\n+           (save-excursion\n+             (beginning-of-line)\n+             (when (looking-at \"[[:space:]]*\\\\(#\\\\)\")\n+               (replace-match \"\" nil nil nil 1))))\n+          ((eq comment-type 'single-line)\n+           (coffee-indent-line)))))\n+\n+(defun coffee-auto-fill-fn ()\n+  (let* ((comment-type (plist-get (coffee-get-comment-info) :type))","path":"coffee-mode.el","position":27,"original_position":27,"commit_id":"a385df1a82e50ea369682f030397b9944fecd237","original_commit_id":"a385df1a82e50ea369682f030397b9944fecd237","user":{"login":"syohex","id":554281,"avatar_url":"https://avatars.githubusercontent.com/u/554281?v=3","gravatar_id":"","url":"https://api.github.com/users/syohex","html_url":"https://github.com/syohex","followers_url":"https://api.github.com/users/syohex/followers","following_url":"https://api.github.com/users/syohex/following{/other_user}","gists_url":"https://api.github.com/users/syohex/gists{/gist_id}","starred_url":"https://api.github.com/users/syohex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syohex/subscriptions","organizations_url":"https://api.github.com/users/syohex/orgs","repos_url":"https://api.github.com/users/syohex/repos","events_url":"https://api.github.com/users/syohex/events{/privacy}","received_events_url":"https://api.github.com/users/syohex/received_events","type":"User","site_admin":false},"body":"Please use `let` instead of `let*`","created_at":"2016-01-08T18:18:34Z","updated_at":"2016-01-08T18:18:34Z","html_url":"https://github.com/defunkt/coffee-mode/pull/337#discussion_r49218947","pull_request_url":"https://api.github.com/repos/defunkt/coffee-mode/pulls/337","_links":{"self":{"href":"https://api.github.com/repos/defunkt/coffee-mode/pulls/comments/49218947"},"html":{"href":"https://github.com/defunkt/coffee-mode/pull/337#discussion_r49218947"},"pull_request":{"href":"https://api.github.com/repos/defunkt/coffee-mode/pulls/337"}}},"pull_request":{"url":"https://api.github.com/repos/defunkt/coffee-mode/pulls/337","id":55483973,"html_url":"https://github.com/defunkt/coffee-mode/pull/337","diff_url":"https://github.com/defunkt/coffee-mode/pull/337.diff","patch_url":"https://github.com/defunkt/coffee-mode/pull/337.patch","issue_url":"https://api.github.com/repos/defunkt/coffee-mode/issues/337","number":337,"state":"open","locked":false,"title":"fix filling of inline and multiline comments","user":{"login":"cosmicexplorer","id":1305167,"avatar_url":"https://avatars.githubusercontent.com/u/1305167?v=3","gravatar_id":"","url":"https://api.github.com/users/cosmicexplorer","html_url":"https://github.com/cosmicexplorer","followers_url":"https://api.github.com/users/cosmicexplorer/followers","following_url":"https://api.github.com/users/cosmicexplorer/following{/other_user}","gists_url":"https://api.github.com/users/cosmicexplorer/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmicexplorer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmicexplorer/subscriptions","organizations_url":"https://api.github.com/users/cosmicexplorer/orgs","repos_url":"https://api.github.com/users/cosmicexplorer/repos","events_url":"https://api.github.com/users/cosmicexplorer/events{/privacy}","received_events_url":"https://api.github.com/users/cosmicexplorer/received_events","type":"User","site_admin":false},"body":"Auto filling was failing in these two cases (`|` is the position of point):\r\n\r\n1. When in a multiline comment (`###` comment), auto-filling the line resulted in the next line having a `#` prepended to it; this is fixed by this pr.\r\n\r\nFailing case:\r\n``` coffeescript\r\n###\r\n<some text up to fill-column>|\r\n###\r\n```\r\n\r\n2. When in an inline comment, indentation doesn't work correctly (the `#` of each line isn't aligned correctly). This fix calls `coffee-indent-line` so they are aligned correctly.\r\n\r\nFailing case:\r\n``` coffeescript\r\nsomeFunction someArgument # <comment on function that goes to fill-column>|\r\n```\r\n\r\nAlso, `coffee-in-comment-p` is incorrect, because it checks `(syntax-ppss)` after moving point, and I would change it to use `coffee-get-comment-info`, but I don't want to break other things that might rely on it.","created_at":"2016-01-08T16:55:02Z","updated_at":"2016-01-08T18:18:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4bdb96a83f451f2bc93a776991f7651ae2ec3c1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/defunkt/coffee-mode/pulls/337/commits","review_comments_url":"https://api.github.com/repos/defunkt/coffee-mode/pulls/337/comments","review_comment_url":"https://api.github.com/repos/defunkt/coffee-mode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/defunkt/coffee-mode/issues/337/comments","statuses_url":"https://api.github.com/repos/defunkt/coffee-mode/statuses/a385df1a82e50ea369682f030397b9944fecd237","head":{"label":"cosmicexplorer:master","ref":"master","sha":"a385df1a82e50ea369682f030397b9944fecd237","user":{"login":"cosmicexplorer","id":1305167,"avatar_url":"https://avatars.githubusercontent.com/u/1305167?v=3","gravatar_id":"","url":"https://api.github.com/users/cosmicexplorer","html_url":"https://github.com/cosmicexplorer","followers_url":"https://api.github.com/users/cosmicexplorer/followers","following_url":"https://api.github.com/users/cosmicexplorer/following{/other_user}","gists_url":"https://api.github.com/users/cosmicexplorer/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmicexplorer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmicexplorer/subscriptions","organizations_url":"https://api.github.com/users/cosmicexplorer/orgs","repos_url":"https://api.github.com/users/cosmicexplorer/repos","events_url":"https://api.github.com/users/cosmicexplorer/events{/privacy}","received_events_url":"https://api.github.com/users/cosmicexplorer/received_events","type":"User","site_admin":false},"repo":{"id":42021856,"name":"coffee-mode","full_name":"cosmicexplorer/coffee-mode","owner":{"login":"cosmicexplorer","id":1305167,"avatar_url":"https://avatars.githubusercontent.com/u/1305167?v=3","gravatar_id":"","url":"https://api.github.com/users/cosmicexplorer","html_url":"https://github.com/cosmicexplorer","followers_url":"https://api.github.com/users/cosmicexplorer/followers","following_url":"https://api.github.com/users/cosmicexplorer/following{/other_user}","gists_url":"https://api.github.com/users/cosmicexplorer/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmicexplorer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmicexplorer/subscriptions","organizations_url":"https://api.github.com/users/cosmicexplorer/orgs","repos_url":"https://api.github.com/users/cosmicexplorer/repos","events_url":"https://api.github.com/users/cosmicexplorer/events{/privacy}","received_events_url":"https://api.github.com/users/cosmicexplorer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cosmicexplorer/coffee-mode","description":"Emacs Major Mode for CoffeeScript","fork":true,"url":"https://api.github.com/repos/cosmicexplorer/coffee-mode","forks_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/forks","keys_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/teams","hooks_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/hooks","issue_events_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/issues/events{/number}","events_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/events","assignees_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/assignees{/user}","branches_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/branches{/branch}","tags_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/tags","blobs_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/git/refs{/sha}","trees_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/statuses/{sha}","languages_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/languages","stargazers_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/stargazers","contributors_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/contributors","subscribers_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/subscribers","subscription_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/subscription","commits_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/commits{/sha}","git_commits_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/git/commits{/sha}","comments_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/comments{/number}","issue_comment_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/issues/comments{/number}","contents_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/contents/{+path}","compare_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/merges","archive_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/downloads","issues_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/issues{/number}","pulls_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/pulls{/number}","milestones_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/milestones{/number}","notifications_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/labels{/name}","releases_url":"https://api.github.com/repos/cosmicexplorer/coffee-mode/releases{/id}","created_at":"2015-09-06T23:08:28Z","updated_at":"2015-09-06T23:08:29Z","pushed_at":"2016-01-08T16:47:47Z","git_url":"git://github.com/cosmicexplorer/coffee-mode.git","ssh_url":"git@github.com:cosmicexplorer/coffee-mode.git","clone_url":"https://github.com/cosmicexplorer/coffee-mode.git","svn_url":"https://github.com/cosmicexplorer/coffee-mode","homepage":"http://ozmm.org/posts/coffee_mode.html","size":567,"stargazers_count":0,"watchers_count":0,"language":"Emacs Lisp","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"defunkt:master","ref":"master","sha":"224467585cc83a15b087b9745b57044f3af2bba0","user":{"login":"defunkt","id":2,"avatar_url":"https://avatars.githubusercontent.com/u/2?v=3","gravatar_id":"","url":"https://api.github.com/users/defunkt","html_url":"https://github.com/defunkt","followers_url":"https://api.github.com/users/defunkt/followers","following_url":"https://api.github.com/users/defunkt/following{/other_user}","gists_url":"https://api.github.com/users/defunkt/gists{/gist_id}","starred_url":"https://api.github.com/users/defunkt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/defunkt/subscriptions","organizations_url":"https://api.github.com/users/defunkt/orgs","repos_url":"https://api.github.com/users/defunkt/repos","events_url":"https://api.github.com/users/defunkt/events{/privacy}","received_events_url":"https://api.github.com/users/defunkt/received_events","type":"User","site_admin":true},"repo":{"id":550681,"name":"coffee-mode","full_name":"defunkt/coffee-mode","owner":{"login":"defunkt","id":2,"avatar_url":"https://avatars.githubusercontent.com/u/2?v=3","gravatar_id":"","url":"https://api.github.com/users/defunkt","html_url":"https://github.com/defunkt","followers_url":"https://api.github.com/users/defunkt/followers","following_url":"https://api.github.com/users/defunkt/following{/other_user}","gists_url":"https://api.github.com/users/defunkt/gists{/gist_id}","starred_url":"https://api.github.com/users/defunkt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/defunkt/subscriptions","organizations_url":"https://api.github.com/users/defunkt/orgs","repos_url":"https://api.github.com/users/defunkt/repos","events_url":"https://api.github.com/users/defunkt/events{/privacy}","received_events_url":"https://api.github.com/users/defunkt/received_events","type":"User","site_admin":true},"private":false,"html_url":"https://github.com/defunkt/coffee-mode","description":"Emacs Major Mode for CoffeeScript","fork":false,"url":"https://api.github.com/repos/defunkt/coffee-mode","forks_url":"https://api.github.com/repos/defunkt/coffee-mode/forks","keys_url":"https://api.github.com/repos/defunkt/coffee-mode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/defunkt/coffee-mode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/defunkt/coffee-mode/teams","hooks_url":"https://api.github.com/repos/defunkt/coffee-mode/hooks","issue_events_url":"https://api.github.com/repos/defunkt/coffee-mode/issues/events{/number}","events_url":"https://api.github.com/repos/defunkt/coffee-mode/events","assignees_url":"https://api.github.com/repos/defunkt/coffee-mode/assignees{/user}","branches_url":"https://api.github.com/repos/defunkt/coffee-mode/branches{/branch}","tags_url":"https://api.github.com/repos/defunkt/coffee-mode/tags","blobs_url":"https://api.github.com/repos/defunkt/coffee-mode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/defunkt/coffee-mode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/defunkt/coffee-mode/git/refs{/sha}","trees_url":"https://api.github.com/repos/defunkt/coffee-mode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/defunkt/coffee-mode/statuses/{sha}","languages_url":"https://api.github.com/repos/defunkt/coffee-mode/languages","stargazers_url":"https://api.github.com/repos/defunkt/coffee-mode/stargazers","contributors_url":"https://api.github.com/repos/defunkt/coffee-mode/contributors","subscribers_url":"https://api.github.com/repos/defunkt/coffee-mode/subscribers","subscription_url":"https://api.github.com/repos/defunkt/coffee-mode/subscription","commits_url":"https://api.github.com/repos/defunkt/coffee-mode/commits{/sha}","git_commits_url":"https://api.github.com/repos/defunkt/coffee-mode/git/commits{/sha}","comments_url":"https://api.github.com/repos/defunkt/coffee-mode/comments{/number}","issue_comment_url":"https://api.github.com/repos/defunkt/coffee-mode/issues/comments{/number}","contents_url":"https://api.github.com/repos/defunkt/coffee-mode/contents/{+path}","compare_url":"https://api.github.com/repos/defunkt/coffee-mode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/defunkt/coffee-mode/merges","archive_url":"https://api.github.com/repos/defunkt/coffee-mode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/defunkt/coffee-mode/downloads","issues_url":"https://api.github.com/repos/defunkt/coffee-mode/issues{/number}","pulls_url":"https://api.github.com/repos/defunkt/coffee-mode/pulls{/number}","milestones_url":"https://api.github.com/repos/defunkt/coffee-mode/milestones{/number}","notifications_url":"https://api.github.com/repos/defunkt/coffee-mode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/defunkt/coffee-mode/labels{/name}","releases_url":"https://api.github.com/repos/defunkt/coffee-mode/releases{/id}","created_at":"2010-03-07T08:30:40Z","updated_at":"2015-12-24T04:06:57Z","pushed_at":"2016-01-08T16:55:03Z","git_url":"git://github.com/defunkt/coffee-mode.git","ssh_url":"git@github.com:defunkt/coffee-mode.git","clone_url":"https://github.com/defunkt/coffee-mode.git","svn_url":"https://github.com/defunkt/coffee-mode","homepage":"http://ozmm.org/posts/coffee_mode.html","size":835,"stargazers_count":549,"watchers_count":549,"language":"Emacs Lisp","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":155,"mirror_url":null,"open_issues_count":10,"forks":155,"open_issues":10,"watchers":549,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/defunkt/coffee-mode/pulls/337"},"html":{"href":"https://github.com/defunkt/coffee-mode/pull/337"},"issue":{"href":"https://api.github.com/repos/defunkt/coffee-mode/issues/337"},"comments":{"href":"https://api.github.com/repos/defunkt/coffee-mode/issues/337/comments"},"review_comments":{"href":"https://api.github.com/repos/defunkt/coffee-mode/pulls/337/comments"},"review_comment":{"href":"https://api.github.com/repos/defunkt/coffee-mode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/defunkt/coffee-mode/pulls/337/commits"},"statuses":{"href":"https://api.github.com/repos/defunkt/coffee-mode/statuses/a385df1a82e50ea369682f030397b9944fecd237"}}}}