File: get-recognized-gfm-languages.el

package info (click to toggle)
markdown-mode 2.3%2B154-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,052 kB
  • sloc: lisp: 13,081; makefile: 69; sh: 16
file content (14 lines) | stat: -rw-r--r-- 559 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(require 'cl-lib)

(let ((urlbuf
       (url-retrieve-synchronously
        "https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml"
        t)))
  (prog1 (with-current-buffer urlbuf
           (goto-char (point-min))
           ;; get past http headers
           (re-search-forward "^$")
           (cl-loop while (re-search-forward "^\\([^#[:space:]][^:]+\\):" nil t)
                    for lang = (match-string-no-properties 1)
                    collect (replace-regexp-in-string " " "-" lang)))
    (kill-buffer urlbuf)))