Move code to --mk
This commit is contained in:
parent
8b767ef308
commit
8a7ba04dd0
2 changed files with 18 additions and 18 deletions
|
@ -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
18
init.el
|
@ -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: ")
|
||||
|
|
Loading…
Add table
Reference in a new issue