Add function to find the README of a library
This commit is contained in:
parent
a9bcda748f
commit
fdcb5065f0
@ -91,6 +91,20 @@ Load [[https://github.com/raxod502/straight.el][straight.el]] to manage package
|
||||
(setq straight-use-package-by-default t)
|
||||
#+END_SRC
|
||||
|
||||
** Utility functions
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun find-library-readme (library)
|
||||
(interactive (list (read-library-name)))
|
||||
(let* ((dir (file-name-directory (file-truename (find-library-name library))))
|
||||
(doc (car (directory-files dir t "\\(readme\\|README\\)\\..*"))))
|
||||
(if (not doc)
|
||||
(error "No README found")
|
||||
(find-file doc)
|
||||
(when (eq major-mode 'markdown-mode)
|
||||
(markdown-view-mode)))))
|
||||
#+END_SRC
|
||||
|
||||
|
||||
* Benchmarking
|
||||
`benchmark-init` does what it says on the box. This sets it up to benchmark my init time and then disable benchmarking after init completes.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
Loading…
Reference in New Issue
Block a user