emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/racket-mode 4cf572eb6d 3/8: Show term for "from" when modu


From: ELPA Syncer
Subject: [nongnu] elpa/racket-mode 4cf572eb6d 3/8: Show term for "from" when module/lang/reader
Date: Fri, 22 Nov 2024 19:00:43 -0500 (EST)

branch: elpa/racket-mode
commit 4cf572eb6dcdfd6601b29bad8f047b52d05b6d37
Author: Greg Hendershott <git@greghendershott.com>
Commit: Greg Hendershott <git@greghendershott.com>

    Show term for "from" when module/lang/reader
---
 racket/scribble.rkt | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/racket/scribble.rkt b/racket/scribble.rkt
index 03e764fde8..6d72c63a14 100644
--- a/racket/scribble.rkt
+++ b/racket/scribble.rkt
@@ -226,7 +226,8 @@
        (values what from fams pkg sort-order)]
       [(index-desc? desc)
        (define ht (index-desc-extras desc))
-       (define what (match (hash-ref ht 'module-kind #f)
+       (define module-kind (hash-ref ht 'module-kind #f))
+       (define what (match module-kind
                       ['lib    "module"]
                       ['lang   "language"]
                       ['reader "reader"]
@@ -236,12 +237,15 @@
          (match (hash-ref ht 'display-from-libs #f)
            [(? list? contents)
             (string-join (map content->string contents) ", ")]
-           [#f (doc-from)]))
+           [#f
+            (match module-kind
+              [(or 'lib 'lang 'reader) term]
+              [_ (doc-from)])]))
        (define fams (match (hash-ref ht 'language-family #f)
                       [(? list? fams) (string-join (map ~a fams) ", ")]
                       [#f "Racket"]))
        (define pkg (lib-pkg
-                    (match (hash-ref ht 'module-kind #f)
+                    (match module-kind
                       ['lib (string->symbol term)]
                       [_    #f])))
        (define sort-order (hash-ref ht 'sort-order 0))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]