{"action":"created","comment":{"url":"https://api.github.com/repos/elixir-lang/emacs-elixir/pulls/comments/31066989","id":31066989,"diff_hunk":"@@ -273,6 +254,99 @@ for the Elixir programming language.\"\n             (t\n              (rx-to-string (car sexps) t))))))\n \n+(defsubst elixir-syntax-count-quotes (quote-char &optional point limit)\n+  \"Count number of quotes around point (max is 3).\n+QUOTE-CHAR is the quote char to count.  Optional argument POINT is\n+the point where scan starts (defaults to current point), and LIMIT\n+is used to limit the scan.\"\n+  (let ((i 0))\n+    (while (and (< i 3)\n+                (or (not limit) (< (+ point i) limit))\n+                (eq (char-after (+ point i)) quote-char))\n+      (setq i (1+ i)))\n+    i))\n+\n+(defun elixir-syntax-stringify ()\n+  \"Put `syntax-table' property correctly on single/triple quotes.\"\n+  (let* ((num-quotes (length (match-string-no-properties 1)))\n+         (ppss (prog2\n+                   (backward-char num-quotes)\n+                   (syntax-ppss)\n+                 (forward-char num-quotes)))\n+         (string-start (and (not (nth 4 ppss)) (nth 8 ppss)))\n+         (quote-starting-pos (- (point) num-quotes))\n+         (quote-ending-pos (point))\n+         (num-closing-quotes\n+          (and string-start\n+               (elixir-syntax-count-quotes\n+                (char-before) string-start quote-starting-pos))))\n+    (cond ((and string-start (= num-closing-quotes 0))\n+           ;; This set of quotes doesn't match the string starting\n+           ;; kind. Do nothing.\n+           nil)\n+          ((not string-start)\n+           ;; This set of quotes delimit the start of a string.\n+           (put-text-property quote-starting-pos (1+ quote-starting-pos)\n+                              'syntax-table (string-to-syntax \"|\")))\n+          ((= num-quotes num-closing-quotes)\n+           ;; This set of quotes delimit the end of a string.\n+           (put-text-property (1- quote-ending-pos) quote-ending-pos\n+                              'syntax-table (string-to-syntax \"|\")))\n+          ((> num-quotes num-closing-quotes)\n+           ;; This may only happen whenever a triple quote is closing\n+           ;; a single quoted string. Add string delimiter syntax to\n+           ;; all three quotes.\n+           (put-text-property quote-starting-pos quote-ending-pos\n+                              'syntax-table (string-to-syntax \"|\"))))))\n+\n+\n+(defun elixir-syntax-propertize-interpolation ()\n+  (let* ((beg (match-beginning 0))\n+         (context (save-excursion (save-match-data (syntax-ppss beg)))))\n+    (put-text-property beg (1+ beg) 'elixir-interpolation\n+                       (cons (nth 3 context) (match-data)))))\n+\n+(defconst elixir-syntax-propertize-function\n+  (syntax-propertize-rules\n+   ((elixir-rx string-delimiter)\n+    (0 (ignore (elixir-syntax-stringify))))\n+   ((rx (group \"#{\" (0+ (not (any \"}\"))) \"}\"))\n+    (0 (ignore (elixir-syntax-propertize-interpolation))))))\n+\n+(defun elixir-syntax-propertize-function (start end)\n+  (let ((case-fold-search nil))\n+    (goto-char start)\n+    (funcall\n+     (syntax-propertize-rules\n+      ((elixir-rx string-delimiter)\n+       (0 (ignore (elixir-syntax-stringify))))\n+      ((rx (group \"#{\" (0+ (not (any \"}\"))) \"}\"))\n+       (0 (ignore (elixir-syntax-propertize-interpolation)))))\n+     start end)))\n+\n+;; (defun elixir-syntax-propertize-function (start end)","path":"elixir-mode.el","position":121,"original_position":121,"commit_id":"6dd478b31e7324b49ca03cbebfb519ec34c30f96","original_commit_id":"6dd478b31e7324b49ca03cbebfb519ec34c30f96","user":{"login":"andreas-roehler","id":1173139,"avatar_url":"https://avatars.githubusercontent.com/u/1173139?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas-roehler","html_url":"https://github.com/andreas-roehler","followers_url":"https://api.github.com/users/andreas-roehler/followers","following_url":"https://api.github.com/users/andreas-roehler/following{/other_user}","gists_url":"https://api.github.com/users/andreas-roehler/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas-roehler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas-roehler/subscriptions","organizations_url":"https://api.github.com/users/andreas-roehler/orgs","repos_url":"https://api.github.com/users/andreas-roehler/repos","events_url":"https://api.github.com/users/andreas-roehler/events{/privacy}","received_events_url":"https://api.github.com/users/andreas-roehler/received_events","type":"User","site_admin":false},"body":"\nAm 26.05.2015 um 20:49 schrieb Matt DeBoard:\n\n> Please delete lines 327-335\n>\n> —\n> Reply to this email directly or view it on GitHub \n> <https://github.com/elixir-lang/emacs-elixir/pull/203/files#r31066466>.\n>\nThis is obsolet now. There is a new pull-request. Fixes TQS only.\n\n","created_at":"2015-05-26T18:54:43Z","updated_at":"2015-05-26T18:54:43Z","html_url":"https://github.com/elixir-lang/emacs-elixir/pull/203#discussion_r31066989","pull_request_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/pulls/203","_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/emacs-elixir/pulls/comments/31066989"},"html":{"href":"https://github.com/elixir-lang/emacs-elixir/pull/203#discussion_r31066989"},"pull_request":{"href":"https://api.github.com/repos/elixir-lang/emacs-elixir/pulls/203"}}},"pull_request":{"url":"https://api.github.com/repos/elixir-lang/emacs-elixir/pulls/203","id":36233180,"html_url":"https://github.com/elixir-lang/emacs-elixir/pull/203","diff_url":"https://github.com/elixir-lang/emacs-elixir/pull/203.diff","patch_url":"https://github.com/elixir-lang/emacs-elixir/pull/203.patch","issue_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/issues/203","number":203,"state":"open","locked":false,"title":"#167 fontify triple-quoted-string, fixed","user":{"login":"andreas-roehler","id":1173139,"avatar_url":"https://avatars.githubusercontent.com/u/1173139?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas-roehler","html_url":"https://github.com/andreas-roehler","followers_url":"https://api.github.com/users/andreas-roehler/followers","following_url":"https://api.github.com/users/andreas-roehler/following{/other_user}","gists_url":"https://api.github.com/users/andreas-roehler/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas-roehler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas-roehler/subscriptions","organizations_url":"https://api.github.com/users/andreas-roehler/orgs","repos_url":"https://api.github.com/users/andreas-roehler/repos","events_url":"https://api.github.com/users/andreas-roehler/events{/privacy}","received_events_url":"https://api.github.com/users/andreas-roehler/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-26T18:48:53Z","updated_at":"2015-05-26T18:54:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24dffb5ec9900955d0e28efa5d33ce111c00eab4","assignee":{"login":"mattdeboard","id":306571,"avatar_url":"https://avatars.githubusercontent.com/u/306571?v=3","gravatar_id":"","url":"https://api.github.com/users/mattdeboard","html_url":"https://github.com/mattdeboard","followers_url":"https://api.github.com/users/mattdeboard/followers","following_url":"https://api.github.com/users/mattdeboard/following{/other_user}","gists_url":"https://api.github.com/users/mattdeboard/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdeboard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdeboard/subscriptions","organizations_url":"https://api.github.com/users/mattdeboard/orgs","repos_url":"https://api.github.com/users/mattdeboard/repos","events_url":"https://api.github.com/users/mattdeboard/events{/privacy}","received_events_url":"https://api.github.com/users/mattdeboard/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/pulls/203/commits","review_comments_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/pulls/203/comments","review_comment_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/issues/203/comments","statuses_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/statuses/6dd478b31e7324b49ca03cbebfb519ec34c30f96","head":{"label":"andreas-roehler:master","ref":"master","sha":"6dd478b31e7324b49ca03cbebfb519ec34c30f96","user":{"login":"andreas-roehler","id":1173139,"avatar_url":"https://avatars.githubusercontent.com/u/1173139?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas-roehler","html_url":"https://github.com/andreas-roehler","followers_url":"https://api.github.com/users/andreas-roehler/followers","following_url":"https://api.github.com/users/andreas-roehler/following{/other_user}","gists_url":"https://api.github.com/users/andreas-roehler/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas-roehler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas-roehler/subscriptions","organizations_url":"https://api.github.com/users/andreas-roehler/orgs","repos_url":"https://api.github.com/users/andreas-roehler/repos","events_url":"https://api.github.com/users/andreas-roehler/events{/privacy}","received_events_url":"https://api.github.com/users/andreas-roehler/received_events","type":"User","site_admin":false},"repo":{"id":36311809,"name":"emacs-elixir-tqs","full_name":"andreas-roehler/emacs-elixir-tqs","owner":{"login":"andreas-roehler","id":1173139,"avatar_url":"https://avatars.githubusercontent.com/u/1173139?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas-roehler","html_url":"https://github.com/andreas-roehler","followers_url":"https://api.github.com/users/andreas-roehler/followers","following_url":"https://api.github.com/users/andreas-roehler/following{/other_user}","gists_url":"https://api.github.com/users/andreas-roehler/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas-roehler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas-roehler/subscriptions","organizations_url":"https://api.github.com/users/andreas-roehler/orgs","repos_url":"https://api.github.com/users/andreas-roehler/repos","events_url":"https://api.github.com/users/andreas-roehler/events{/privacy}","received_events_url":"https://api.github.com/users/andreas-roehler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andreas-roehler/emacs-elixir-tqs","description":"Emacs major mode for Elixir ","fork":true,"url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs","forks_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/forks","keys_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/teams","hooks_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/hooks","issue_events_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/issues/events{/number}","events_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/events","assignees_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/assignees{/user}","branches_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/branches{/branch}","tags_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/tags","blobs_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/git/refs{/sha}","trees_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/statuses/{sha}","languages_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/languages","stargazers_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/stargazers","contributors_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/contributors","subscribers_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/subscribers","subscription_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/subscription","commits_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/commits{/sha}","git_commits_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/git/commits{/sha}","comments_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/comments{/number}","issue_comment_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/issues/comments{/number}","contents_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/contents/{+path}","compare_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/merges","archive_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/downloads","issues_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/issues{/number}","pulls_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/pulls{/number}","milestones_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/milestones{/number}","notifications_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/labels{/name}","releases_url":"https://api.github.com/repos/andreas-roehler/emacs-elixir-tqs/releases{/id}","created_at":"2015-05-26T17:21:24Z","updated_at":"2015-05-26T17:21:51Z","pushed_at":"2015-05-26T18:41:01Z","git_url":"git://github.com/andreas-roehler/emacs-elixir-tqs.git","ssh_url":"git@github.com:andreas-roehler/emacs-elixir-tqs.git","clone_url":"https://github.com/andreas-roehler/emacs-elixir-tqs.git","svn_url":"https://github.com/andreas-roehler/emacs-elixir-tqs","homepage":null,"size":2129,"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":"elixir-lang:master","ref":"master","sha":"f2a94d402a6502ac551c97895c3f2ac8126dee03","user":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":9206788,"name":"emacs-elixir","full_name":"elixir-lang/emacs-elixir","owner":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixir-lang/emacs-elixir","description":"Emacs major mode for Elixir ","fork":false,"url":"https://api.github.com/repos/elixir-lang/emacs-elixir","forks_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/forks","keys_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/teams","hooks_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/hooks","issue_events_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/issues/events{/number}","events_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/events","assignees_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/assignees{/user}","branches_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/branches{/branch}","tags_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/tags","blobs_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/statuses/{sha}","languages_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/languages","stargazers_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/stargazers","contributors_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/contributors","subscribers_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/subscribers","subscription_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/subscription","commits_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/issues/comments{/number}","contents_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/contents/{+path}","compare_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/merges","archive_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/downloads","issues_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/issues{/number}","pulls_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/pulls{/number}","milestones_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/milestones{/number}","notifications_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/labels{/name}","releases_url":"https://api.github.com/repos/elixir-lang/emacs-elixir/releases{/id}","created_at":"2013-04-03T22:53:59Z","updated_at":"2015-05-26T15:14:35Z","pushed_at":"2015-05-26T18:48:53Z","git_url":"git://github.com/elixir-lang/emacs-elixir.git","ssh_url":"git@github.com:elixir-lang/emacs-elixir.git","clone_url":"https://github.com/elixir-lang/emacs-elixir.git","svn_url":"https://github.com/elixir-lang/emacs-elixir","homepage":null,"size":2129,"stargazers_count":115,"watchers_count":115,"language":"Emacs Lisp","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":7,"forks":38,"open_issues":7,"watchers":115,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/emacs-elixir/pulls/203"},"html":{"href":"https://github.com/elixir-lang/emacs-elixir/pull/203"},"issue":{"href":"https://api.github.com/repos/elixir-lang/emacs-elixir/issues/203"},"comments":{"href":"https://api.github.com/repos/elixir-lang/emacs-elixir/issues/203/comments"},"review_comments":{"href":"https://api.github.com/repos/elixir-lang/emacs-elixir/pulls/203/comments"},"review_comment":{"href":"https://api.github.com/repos/elixir-lang/emacs-elixir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elixir-lang/emacs-elixir/pulls/203/commits"},"statuses":{"href":"https://api.github.com/repos/elixir-lang/emacs-elixir/statuses/6dd478b31e7324b49ca03cbebfb519ec34c30f96"}}}}