summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2022-02-06 22:17:56 -0600
committerCase Duckworth2022-02-06 22:18:36 -0600
commitb0abd8aca60912f283bf43df651d14a36dbc9f6a (patch)
tree16462ce783bb68f8fd267dbf06e9408a16c7298b /lisp
parentAdd other link types (diff)
downloademacs-b0abd8aca60912f283bf43df651d14a36dbc9f6a.tar.gz
emacs-b0abd8aca60912f283bf43df651d14a36dbc9f6a.zip
Meh
Diffstat (limited to 'lisp')
-rw-r--r--lisp/+xkcd.el16
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