blob: 6780b907db059ff2744bdf764e83172444f59171 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
;;; +xkcd.el -*- lexical-binding: t; -*-
;;; Commentary:
;;; Code:
(require 'xkcd)
(defun +xkcd-get-from-url (url &rest _)
"Open XKCD from URL."
(if (string-match "xkcd\\.com/\\([0-9]+\\)" url)
(xkcd-get (string-to-number (match-string 1 url)))
(funcall +browse-url-browser-function url)))
(provide '+xkcd)
;;; +xkcd.el ends here
|