: write-link ( string object -- ) link-style get [ write-object ] with-style ; GENERIC# write-link* 1 ( topic ? -- ) M: object write-link* [ >link ] dip write-link* ; M: topic write-link* dupd [ article-title ] [ article-name ] if swap write-link ; M: word write-link* not [ f call-next-method ] [ dup f call-next-method stack-effect [ effect>string ] [ effect-style ] bi [ bl write ] with-style ] if ; : (($link)) ( topic ? ? -- ) [ dup string? [ >link ] when ] 2dip [ over definition-icon 1array $image " " print-element ] when [ write-link* ] ($span) ; : ($link) ( topic -- ) f f (($link)) ; : $link ( element -- ) first ($link) ; : ($long-link) ( topic -- ) t f (($link)) ; : $long-link ( element -- ) first ($long-link) ; : ($pretty-link) ( topic -- ) f t (($link)) ; : $pretty-link ( element -- ) first ($pretty-link) ; : ($long-pretty-link) ( topic -- ) t t (($link)) ; : $long-pretty-link ( element -- ) first ($long-pretty-link) ;