mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Reformat docs/api.org
This commit is contained in:
@ -112,8 +112,20 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.")
|
||||
"Add Doom's own demos to help buffers."
|
||||
:around #'elisp-demos--search
|
||||
(or (funcall orig-fn symbol)
|
||||
(when-let* ((elisp-demos--elisp-demos.org (doom-glob doom-docs-dir "api.org")))
|
||||
(funcall orig-fn symbol)))))
|
||||
(when-let (demos-file (doom-glob doom-docs-dir "api.org"))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents demos-file)
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward
|
||||
(format "^\\*\\*\\* %s$" (regexp-quote (symbol-name symbol)))
|
||||
nil t)
|
||||
(let (beg end)
|
||||
(forward-line 1)
|
||||
(setq beg (point))
|
||||
(if (re-search-forward "^\\*" nil t)
|
||||
(setq end (line-beginning-position))
|
||||
(setq end (point-max)))
|
||||
(string-trim (buffer-substring-no-properties beg end)))))))))
|
||||
|
||||
|
||||
(use-package! buttercup
|
||||
|
Reference in New Issue
Block a user