fix(emacs-lisp): failure to look up module docs
Incorrect regex would cause (search-failed "\* ...$") errors, and would fail to unfold the target entries if it was hidden.
This commit is contained in:
parent
0f0fade3c0
commit
8e671f494d
1 changed files with 6 additions and 3 deletions
|
@ -102,15 +102,18 @@ if it's callable, `apropos' otherwise."
|
||||||
(cond ((when-let (module (+emacs-lisp--module-at-point))
|
(cond ((when-let (module (+emacs-lisp--module-at-point))
|
||||||
(doom/help-modules (car module) (cadr module))
|
(doom/help-modules (car module) (cadr module))
|
||||||
(when (eq major-mode 'org-mode)
|
(when (eq major-mode 'org-mode)
|
||||||
|
(goto-char (point-min))
|
||||||
(with-demoted-errors "%s"
|
(with-demoted-errors "%s"
|
||||||
(re-search-forward
|
(re-search-forward
|
||||||
(if (caddr module)
|
(if (caddr module)
|
||||||
"\\* Module flags$"
|
"^\\*+ Module flags"
|
||||||
"\\* Description$"))
|
"^\\* Description"))
|
||||||
(when (caddr module)
|
(when (caddr module)
|
||||||
(re-search-forward (format "=\\%s=" (caddr module))
|
(re-search-forward (format "=\\%s=" (caddr module))
|
||||||
nil t))
|
nil t))
|
||||||
(when (invisible-p (point))
|
(when (memq (get-char-property (line-end-position)
|
||||||
|
'invisible)
|
||||||
|
'(outline org-fold-outline))
|
||||||
(org-show-hidden-entry))))
|
(org-show-hidden-entry))))
|
||||||
'deferred))
|
'deferred))
|
||||||
(thing (helpful-symbol (intern thing)))
|
(thing (helpful-symbol (intern thing)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue