dotemacs

My Emacs configuration
git clone git://git.entf.net/dotemacs
Log | Files | Refs | LICENSE

get-recognized-gfm-languages.el (591B)


      1 ;; -*- lexical-binding: t; -*-
      2 
      3 (require 'cl-lib)
      4 
      5 (let ((urlbuf
      6        (url-retrieve-synchronously
      7         "https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml"
      8         t)))
      9   (prog1 (with-current-buffer urlbuf
     10            (goto-char (point-min))
     11            ;; get past http headers
     12            (re-search-forward "^$")
     13            (cl-loop while (re-search-forward "^\\([^#[:space:]][^:]+\\):" nil t)
     14                     for lang = (match-string-no-properties 1)
     15                     collect (replace-regexp-in-string " " "-" lang)))
     16     (kill-buffer urlbuf)))