Move docs/api.org to emacs-lisp module

This commit is contained in:
Henrik Lissner 2021-01-17 15:53:12 -05:00
parent 1ddeb119dd
commit 1c8451e509
2 changed files with 61 additions and 143 deletions

View file

@ -183,12 +183,12 @@ employed so that flycheck still does *some* helpful linting.")
"Add Doom's own demos to help buffers."
:around #'elisp-demos--search
(or (funcall orig-fn symbol)
(when-let (demos-file (doom-glob doom-docs-dir "api.org"))
(when-let (demos-file (doom-module-locate-path :lang 'emacs-lisp "demos.org"))
(with-temp-buffer
(insert-file-contents demos-file)
(goto-char (point-min))
(when (re-search-forward
(format "^\\*\\*\\* %s$" (regexp-quote (symbol-name symbol)))
(format "^\\*\\* %s$" (regexp-quote (symbol-name symbol)))
nil t)
(let (beg end)
(forward-line 1)