summaryrefslogtreecommitdiff
path: root/elisp/geiser-edit.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-10-16 02:59:54 +0100
committerjao <jao@gnu.org>2022-10-16 02:59:54 +0100
commitc437b1eca906f9c06eb5acef49f84bc4a87d2b8b (patch)
tree76a8d0a65793cd5f2031e7d7dfc3d0fe99c66f4f /elisp/geiser-edit.el
parente320b982c43edffed2520ba5bfbbb5b4832aad52 (diff)
downloadgeiser-c437b1eca906f9c06eb5acef49f84bc4a87d2b8b.tar.gz
geiser-c437b1eca906f9c06eb5acef49f84bc4a87d2b8b.tar.bz2
fallback autodoc inferred via cheap regexps
same code that finds putative definitions, with all its caveats
Diffstat (limited to 'elisp/geiser-edit.el')
-rw-r--r--elisp/geiser-edit.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/elisp/geiser-edit.el b/elisp/geiser-edit.el
index 165e0fc..ee85bdf 100644
--- a/elisp/geiser-edit.el
+++ b/elisp/geiser-edit.el
@@ -88,7 +88,7 @@ or following links in error buffers.")
(regexp-opt '("define-syntaxes" "define-values")))
(defsubst geiser-edit--def-re (thing)
- (format "(%s +(?%s\\_>"
+ (format "(%s *[( ]\\(%s\\_>[^)]*\\)[ )\n]"
geiser-edit--def-re
(regexp-quote (format "%s" thing))))
@@ -102,7 +102,7 @@ or following links in error buffers.")
(goto-char (point-min))
(when (or (re-search-forward (geiser-edit--def-re symbol) nil t)
(re-search-forward (geiser-edit--def-re* symbol) nil t))
- (cons (match-beginning 0) (match-string-no-properties 0)))))
+ (cons (match-beginning 0) (match-string 1)))))
(defsubst geiser-edit--symbol-re (thing)
(format "\\_<%s\\_>" (regexp-quote (format "%s" thing))))