From d8e16db60579f1fd9a8a1f9ce6a7cc6d6e964618 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 10 Sep 2023 05:11:43 +0200 Subject: [PATCH] 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: cd269753cff7 --- modules/lang/emacs-lisp/autoload.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/emacs-lisp/autoload.el b/modules/lang/emacs-lisp/autoload.el index 9e1aadbe3..5eb7ee499 100644 --- a/modules/lang/emacs-lisp/autoload.el +++ b/modules/lang/emacs-lisp/autoload.el @@ -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)