fix(emacs-lisp): Doom API demos in help(ful) docs

Due to cd26975, `with-file-contents!` leaves the cursor at point-min,
not point-max, so this `re-search-backward` call would never find its
mark. Now, the elisp demos for Doom functions/macros should show up
again in helpful-*/describe-* buffers.

Amend: cd269753cf
This commit is contained in:
Henrik Lissner 2023-09-10 05:11:43 +02:00
parent 56d396c5f6
commit d8e16db605
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -392,7 +392,7 @@ Intended as :around advice for `elisp-demos--search'."
(or (funcall fn symbol)
(with-file-contents! (doom-path doom-docs-dir "examples.org")
(save-excursion
(when (re-search-backward
(when (re-search-forward
(format "^\\*+[ \t]+\\(?:TODO \\)?%s$"
(regexp-quote (symbol-name symbol)))
nil t)