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

[MacPerl] Alpha->Shuck hack



At 0:16 -0800 3/4/97, Gaspard Gendreau wrote:
>Or would it be possible to have Shuck open and find the keyword?

Here's a quick hack to make Alpha use Shuck to look up keywords. This
basically just replaces the within-Alpha lookup, so there could be a lot of
things done better (as David Schooley pointed out, maybe there's no reason
to open another app if Alpha can do the job). Here's a couple ideas for
ways to make it better--any others?

1) make Alpha first scan the pod index file to see if it's worth even opening
   Shuck at all

2) make it look up not just Perl keywords, but Mac-specific stuff as well
   (Matthias--can we build a POD index file for the Mac stuff? Is there a
   reason you can't look that stuff up in Shuck?)

3) hire a Scottish scientist to clone Matthias (ok, not specific to Shuck,
   but...)

----------------------------------------------------------------------------
1) Add to your "TCL:Modes:PerlMode.tcl" file the line:

	set pathComments(ShuckAppPath) "Shuck Application"

2) Find the procedure "PerlDblClick" in your "TCL:Modes:Perl5.tcl" file.
Add "ShuckAppPath" as a global. So the first two lines will probably look
like this:

	global HOME perlKeyWords perlLookup perlDocs perlVersion
	global perlSearchPath ShuckAppPath

3) Now look for the the lines (probably around line #188):

	set file [lindex $perlLookup($text) 0]
	set mark [lindex $perlLookup($text) 1]
	openFileQuietly "$perlDocs$file"
	podFindMark "$mark"

Comment out those four lines (in case I've screwed something up here), and
add these:

	launch $ShuckAppPath
	dosc -c '·uck' -k 'misc' -e 'mvis' -s "$text"

Notice that that second line should have an epsilon character in it, as the
character before 'uck'. That may not make it through in this mail, so you
might have to re-type it (option-w).

Restart, set the Shuck path (in the Config->App Paths menu) and then when
you double click on keywords, they should pop open in Shuck.
----------------------------------------------------------------------------

Note that this assumes that you _are_ using the Perl5--but there's really
no reason why anybody would still have Alpha set to Perl4 mode, is there?
But it seems the Perl4.tcl file is more or less the same, anyway.



-dan