diff options
author | Case Duckworth | 2022-02-06 22:17:56 -0600 |
---|---|---|
committer | Case Duckworth | 2022-02-06 22:18:36 -0600 |
commit | b0abd8aca60912f283bf43df651d14a36dbc9f6a (patch) | |
tree | 16462ce783bb68f8fd267dbf06e9408a16c7298b /lisp | |
parent | Add other link types (diff) | |
download | emacs-b0abd8aca60912f283bf43df651d14a36dbc9f6a.tar.gz emacs-b0abd8aca60912f283bf43df651d14a36dbc9f6a.zip |
Meh
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/+xkcd.el | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lisp/+xkcd.el b/lisp/+xkcd.el new file mode 100644 index 0000000..6780b90 --- /dev/null +++ b/lisp/+xkcd.el | |||
@@ -0,0 +1,16 @@ | |||
1 | ;;; +xkcd.el -*- lexical-binding: t; -*- | ||
2 | |||
3 | ;;; Commentary: | ||
4 | |||
5 | ;;; Code: | ||
6 | |||
7 | (require 'xkcd) | ||
8 | |||
9 | (defun +xkcd-get-from-url (url &rest _) | ||
10 | "Open XKCD from URL." | ||
11 | (if (string-match "xkcd\\.com/\\([0-9]+\\)" url) | ||
12 | (xkcd-get (string-to-number (match-string 1 url))) | ||
13 | (funcall +browse-url-browser-function url))) | ||
14 | |||
15 | (provide '+xkcd) | ||
16 | ;;; +xkcd.el ends here | ||