Links to words in apropos work better
parent
92708c7231
commit
00fb6496fb
|
@ -147,6 +147,12 @@ ALIAS: $slot $snippet
|
||||||
: $link ( element -- )
|
: $link ( element -- )
|
||||||
first ($link) ;
|
first ($link) ;
|
||||||
|
|
||||||
|
: ($word-link) ( word -- )
|
||||||
|
[ name>> ] keep write-link ;
|
||||||
|
|
||||||
|
: $word-link ( element -- )
|
||||||
|
first ($word-link) ;
|
||||||
|
|
||||||
: ($long-link) ( object -- )
|
: ($long-link) ( object -- )
|
||||||
[ article-title ] [ >link ] bi write-link ;
|
[ article-title ] [ >link ] bi write-link ;
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,6 @@ M: more-completions article-name
|
||||||
M: more-completions article-content
|
M: more-completions article-content
|
||||||
seq>> sort-values keys \ $completions prefix ;
|
seq>> sort-values keys \ $completions prefix ;
|
||||||
|
|
||||||
M: more-completions summary article-title ;
|
|
||||||
|
|
||||||
: (apropos) ( str candidates title -- element )
|
: (apropos) ( str candidates title -- element )
|
||||||
[
|
[
|
||||||
[ completions ] dip '[
|
[ completions ] dip '[
|
||||||
|
|
|
@ -160,7 +160,7 @@ C: <vocab-author> vocab-author
|
||||||
|
|
||||||
: words-table ( words -- )
|
: words-table ( words -- )
|
||||||
[
|
[
|
||||||
[ <$link> ]
|
[ 1array \ $word-link prefix ]
|
||||||
[ stack-effect dup [ effect>string <$snippet> ] when ]
|
[ stack-effect dup [ effect>string <$snippet> ] when ]
|
||||||
bi 2array
|
bi 2array
|
||||||
] map
|
] map
|
||||||
|
|
Loading…
Reference in New Issue