Move code to --mk

This commit is contained in:
Marcus Kammer 2023-11-12 09:28:50 +01:00
parent 8b767ef308
commit 8a7ba04dd0
Signed by: marcuskammer
GPG key ID: C374817BE285268F
2 changed files with 18 additions and 18 deletions

View file

@ -166,3 +166,21 @@
(random-number-2 (random 9999)))
(let ((unique-id (format "DE-%04d-%04d" random-number-1 random-number-2)))
(message "ID: %s" unique-id) unique-id)))
(defmacro mk/open-html-page (name path)
"Make interactive functions to call important docs"
`(defun ,name ()
(interactive)
(eww (concat "file://"
(and (eq system-type 'windows-nt)
"/")
(expand-file-name ,path)))))
(mk/open-html-page mk/clsite-clm
"~/cl-sites/www.cs.cmu.edu/Groups/AI/html/cltl/clm/node1.html")
(mk/open-html-page mk/clsite-pcl
"~/cl-sites/gigamonkeys.com/book/index.html")
(mk/open-html-page mk/clsite-clcb
"~/cl-sites/lispcookbook.github.io/cl-cookbook/index.html")
(mk/open-html-page mk/clsite-sqlite
"~/cl-sites/sqlite-doc-3440000/index.html")

18
init.el
View file

@ -24,24 +24,6 @@
(when (file-exists-p f)
(load-file f)))
(defmacro mk/open-html-page (name path)
"Make interactive functions to call important docs"
`(defun ,name ()
(interactive)
(eww (concat "file://"
(and (eq system-type 'windows-nt)
"/")
(expand-file-name ,path)))))
(mk/open-html-page mk/clsite-clm
"~/cl-sites/www.cs.cmu.edu/Groups/AI/html/cltl/clm/node1.html")
(mk/open-html-page mk/clsite-pcl
"~/cl-sites/gigamonkeys.com/book/index.html")
(mk/open-html-page mk/clsite-clcb
"~/cl-sites/lispcookbook.github.io/cl-cookbook/index.html")
(mk/open-html-page mk/clsite-sqlite
"~/cl-sites/sqlite-doc-3440000/index.html")
(defun mk/wget-mirror-site (url)
"Use wget to mirror a website for offline use. Takes a URL as argument."
(interactive "sEnter the URL to mirror: ")