1
0
mirror of synced 2026-01-12 00:42:56 +00:00
Interlisp.medley/lispusers/LOADMENUITEMS.TEDIT
2020-11-15 19:22:14 -08:00

24 lines
16 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

en·vÅos LOADMENUITEMS
2
(5 4 1)
LOADMENUITEMS
(1 4 5)
By: sML (Lanning.pa@Xerox.com)
INTRODUCTION
Some utility files are so useful that users will always want them in their system: these files are typically loaded from the users INIT file. A (rather large) number of other utilities are only sometimes useful. Users are faced with the choice of either loading these files from their INIT files (slowing down the initialization process and consuming space, whether the utility is needed or not) or having to remember how to load and initialize these files.
LOADMENUITEMS addresses this problem: it defines a new filepackage command that can be used to add entries onto the background menu for easy loading of utility files.
[NOTE: All (advertised) symbols in this utility are in the INTERLISP package.]
EXAMPLE
The filepackage command
(COMS
;; Make it easy to load some oft-used utilities
(FILES LoadMenuItems)
(LOADMENUITEMS WritingAids Sketch VirtualKeyboards ProofReader)
(LOADMENUITEMS ProgrammingAids (Spy (SPY.BUTTON)))
(LOADMENUITEMS NIL VStats Calendar))
will add an entry "Load utility" to the background menu. "Load utility" will have three subitems: Misc, ProgrammingAids, and WritingAids:
USä®ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðÀ0À0ÅUUUUUUUUUUUUUUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªªªªªªªªªªªªª0ʪªªªªªªªªªªªªªªªªªªªªªªªªªª0ÅUUUUUUUUUUUUUUUUUUUUUUUUUUU0ÅUUUUUUUUUUUUUUUUUUUUUUUUUUU0ʪªªªªªªªªªª¯ÿÿÿÿÿÿÿÿÿÿÿÿÿÿê0ʪªªªªªªªªªª¨*0ÅUUUUUUUUUUUX50ÅUUUUUUUUUUUXÁ<>50ʪªªªªªªªªªª¨Á€
*0ʪªªªªªªªªªª¨¢‘À*0ÅUUUUUUUUUUUX¢’$@
µ0ÅUUUUUUUUUUUX”‘Ä50ʪªªªªªªªªªª¨<>$
*0ʪªªªªªªªªªª¨ˆ$@*0ÅUUUUUUUUUUUXˆ‘À50ÅUUUUUUUUUUUX50ʪªªªªªªªªªª¨*0ʪªªªªªªªªªª¨*0ÅUUUUUUUUUUUX 50ÅUUUUUUUUUUUYð 50ʪªªªªªªªªªª©
*0ʪªªªªªªªªªª© g‡K8³b\:#£…*0ÅUUUUUUUUUUUY ¨HÍDÌ™bF$dJµ0ÅUUUUUUUUUUUYñHHˆBB"$#…50Ê«ÿÿÿÿÿÿÿÿÿÿùHHdˆBB>$ J*0Ê«ÿÿÿÿÿÿÿÿÿÿùHÈDˆBFA$dD*0ÅWÿÿÿÿÿÿûïÿþù‡H:ˆB:A#£ˆ50ÅWþÿÿÿïÿ»mÿÿx@B50Ê«þÿÿÿïÿ¿}ÿþ¸<*0Ê«þÿ h]ÿ_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿê0ÅWþþöíϽ»mÝþ¯ÿÿÿÿ÷ïÿÿþÿÿÿÿ÷õ0ÅWþþ÷<C3BE>ï½»mëÿ_ÿÿîwöïÿÿ¾þÿÿÿûõ0Ê«þþömï½»mëþ¿ÿÿîwþÿÿÿ¿þÿÿÿõê0Ê«þþöíϹ»m÷ÿÿÿîv”-/^âãÿÿúê0ÅWþ/ÅËnwþÿÿÿõ®VìíÏ^ÜÝÿÿõu0ÅWÿÿÿÿÿÿÿÿ÷ÿÿÿÿõ®öííîîÞãÿÿúõ0Ê«ÿÿÿÿÿÿÿÿÏÿÿÿÿõ®öííîÞýÿÿõê0ʪÿÿûÞöííÍöÜÝÿÿûê0ÅVÿÿûÞ÷-î-öâãÿÿ÷õ0ÅV<1F>ü<04><00>ÿÿÿÿÿÿýïÿÿÿÿÿÿõ0ʪAOÿÿÿÿÿÿþÿÿÿÿÿÿê0ʪ
A¯ÿÿÿÿÿÿÿÿÿÿÿÿÿÿê0ÅV
AøŒ<C3B8>UUUUUUUUUUUUUUUU0ÅV<1F><>¥UUUUUUUUUUUUUUU0ʪA<>Fªªªªªªªªªªªªªªª0ʪ <20>AŒ<>†ªªªªªªªªªªªªªªª0ÅV <20>AütŒUUUUUUUUUUUUUUU0ÅVUUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªª0ʪªªªªªªªªªªªªªªª0ÅVUUUUUUUUUUUUUUU0ÅVx?€UUUUUUUUUUUUUUU0ʪ„‚ªªªªªªªªªªªªªªª0ʪªªªªªªªªªªªªªªª0ÅVþUUUUUUUUUUUUUUU0ÅV"UUUUUUUUUUUUUUU0ʪ>ªªªªªªªªªªªªªªª0ʪAªªªªªªªªªªªªªªª0ÅVxAUUUUUUUUUUUUUUU0ÅVUUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªª0ʪªªªªªªªªªªªªªªª0ÅVUUUUUUUUUUUUUUU0ÅV@…UUUUUUUUUUUUUUU0ʪ@Fªªªªªªªªªªªªªªª0ʪ:G¦ªªªªªªªªªªªªªªª0ÅVFH€UUUUUUUUUUUUUUUU0ÅVBO€¥UUUUUUUUUUUUUUU0ʪBHFªªªªªªªªªªªªªªª0ʪFH€†ªªªªªªªªªªªªªªª0ÅV:GUUUUUUUUUUUUUUU0ÅVUUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªª0ʪªªªªªªªªªªªªªªª0ÅVUUUUUUUUUUUUUUU0ÅVøUUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªª0ʪqÂ"Šªªªªªªªªªªªªªªª0ÅVð‰""ŠUUUUUUUUUUUUUUU0ÅV8£áBRUUUUUUUUUUUUUUU0ʪÈ¢BRªªªªªªªªªªªªªªª0ʪˆB "ªªªªªªªªªªªªªªª0ÅVøtAÀ"UUUUUUUUUUUUUUU0ÅVUUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªª0ʪªªªªªªªªªªªªªªª0ÅVUUUUUUUUUUUUUUU0ÅV|UUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªª0ʪ€\8¸ªªªªªªªªªªªªªªª0ÅVxbDÄUUUUUUUUUUUUUUU0ÅVBUUUUUUUUUUUUUUU0ʪBd„ªªªªªªªªªªªªªªª0ʪBDĪªªªªªªªªªªªªªª0ÅV|B:¸UUUUUUUUUUUUUUU0ÅVUUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªª0ʪªªªªªªªªªªªªªªª0ÅVUUUUUUUUUUUUUUU0ÅV@…UUUUUUUUUUUUUUU0ʪ@Fªªªªªªªªªªªªªªª0ʪGtpñq¦ªªªªªªªªªªªªªªª0ÅVÈšŒ‰ ‰UUUUUUUUUUUUUUUU0ÅVC<><EFBFBD>  ¥UUUUUUUUUUUUUUU0ʪL<><EFBFBD>  Fªªªªªªªªªªªªªªª0ʪH<>Œ‰ ˆ@†ªªªªªªªªªªªªªªª0ÅVGPtpñp@UUUUUUUUUUUUUUU0ÅV@UUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªª0ʪªªªªªªªªªªªªªªª0ÅVUUUUUUUUUUUUUUU0ÅV>ˆUUUUUUUUUUUUUUU0ʪ! ˆªªªªªªªªªªªªªªª0ʪ! ˆªªªªªªªªªªªªªªª0ÅV!
PUUUUUUUUUUUUUUU0ÅV>
PUUUUUUUUUUUUUUU0ʪ ŠPªªªªªªªªªªªªªªª0ʪªªªªªªªªªªªªªªª0ÅV  UUUUUUUUUUUUUUU0ÅVUUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªª0ʪªªªªªªªªªªªªªªª0ÅV@UUUUUUUUUUUUUUU0ÅVþþHUUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªª0ʪ€:^ªªªªªªªªªªªªªªª0ÅVüFHUUUUUUUUUUUUUUU0ÅV€BHUUUUUUUUUUUUUUU0ʪ€BHªªªªªªªªªªªªªªª0ʪ€FHªªªªªªªªªªªªªªª0ÅVþ:FUUUUUUUUUUUUUUU0ÅVUUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªª0ʪªªªªªªªªªªªªªªª0ÅVUUUUUUUUUUUUUUU0ÅVÀL@UUUUUUUUUUUUUUU0ʪ L@ªªªªªªªªªªªªªªª0ʪ‡J(â@ªªªªªªªªªªªªªªª0ÅV„LHÊ)@UUUUUUUUUUUUUUU0ÅVGÈHIHr@UUUUUUUUUUUUUUU0ʪ$HII@ªªªªªªªªªªªªªªª0ʪ$HHȉ@ªªªªªªªªªªªªªªª0ÅVÈGHˆê@UUUUUUUUUUUUUUU0ÅVUUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªª0ʪªªªªªªªªªªªªªªª0ÅV@UUUUUUUUUUUUUUU0ÅV@@UUUUUUUUUUUUUUU0ʪ@ªªªªªªªªªªªªªªª0ʪ@G,ªªªªªªªªªªªªªªª0ÅV@H˜Dˆ˜4UUUUUUUUUUUUUUU0ÅV@G8<><38>Ÿ UUUUUUUUUUUUUUU0ʪ@@<40>ˆ<10> ªªªªªªªªªªªªªªª0ʪ@H˜Dˆ<44> ªªªªªªªªªªªªªªª0ÅV~Gò8gŽ UUUUUUUUUUUUUUU0ÅVUUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªª0Ê«ÿÿÿÿÿÿÿÿÿÿþªªªªªªªªªªªªªªª0ÅUUUUUUUUUUUUUUUUUUUUUUUUUUU0ÅUUUUUUUUUUUUUUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªªªªªªªªªªªªª0ʪªªªªªªªªªªªªªªªªªªªªªªªªªª0ÅUUUUUUUUUUUUUUUUUUUUUUUUUUU0ÅUUUUUUUUUUUUUUUUUUUUUUUUUUU0ʪªªªªªªªªªªªªªªªªªªªªªªªªªª0À0À0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿð
WritingAids will in turn have three subitems: ProofReader, Sketch, and VirtualKeyboards; Misc will have the subitems Calendar and VStats; ProgrammingAids will have the single subitem Spy.
USï;ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÀÀʪªªªªªªªªªªªªªªªªªªªªªªªªªªª¦ÅUUUUUUUUUUUUUUUUUUUUUUUUUUUUFÅUUUUUUUUUUUUUUUUUUUUUUUUUUUUFʪªªªªªªªªªªªªªªªªªªªªªªªªªªª¦Ëÿÿÿÿÿÿÿÿÿÿÿÿÿÿþªªªªªªªªªªªªª¦ÅUUUUUUUUUUUUUFÅUUUUUUUUUUUUUFË2†ªªªªªªªªªªªªª¦Ë0Oÿÿÿÿÿÿÿÿÿÿÿÿÿ¦ÅR8p¨ÆÅRDˆXÆË8€¨àø¦ËH¦ÅDˆˆÏ=páÑÅ€ÆÅ8pP<>2&€ÆËâ<10>øørä¦Ë<10><04>¦Å<10>2$ÆÅ@péÑÄÆË>@ˆ¦Ë!H¦Å!,ðégbÌK‡B„tp¯ÿÿÿÿÿÿÿÿÿÿÿÿÿÆÅ!5 ¨™“2LH„Œ‰_ÿÿÿÿÿÿÿÿÿÿÿÿÿÆË>! "HHDD„p¯ÿÿÿÿýÿ¿ÿÿÿÿ¦Ï ! "HHGÄ„ Oÿÿÿþûýÿ¿ÿÿÿÿ¦Ï ! "HHÈ$Œˆ<C592>ÿÿÿþÿwc£ÿÿÿÿÆÏ ðéQ"HGH$tqÿÿÿÿníÝ<C3AD>ÿÿÿÿÆÏ@ÿÿÿÿ÷^
ß½ÿÿÿÿ¦Çðÿÿÿÿû.ýß½ÿÿÿÿ¦ËÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþûvíݽÿÿÿÿÆÅÿÿÿÿþýÿÿÿßÿÿÿþÿÿÿÿÿ{c½ÿÿÿÿÆËÿÿýÎþÝÿÿ÷ßßÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¦ÇÿÿýÎÿßÿÿ÷ÿßÿÿþ¿ÿÿÿÿÿÿÿÿÿÿÿÿÿ¦ÏÿÿýÎÒ…£ÅëÜ\ÿÿXÆÏÿÿþµÊÝ<C38A>¹ëÛ¿ÿþ¨ÆÏÿÿþµÞݽ½ÝÛÜÿÿY€€¦ÏÿÿþµÞݽ½ÁÛß¿ÿþ¹ ¦Áÿÿÿ{Þݽ¹¾Û¿ÿÿxˆ—èG@â%ÃË:8ÆÁÿÿÿ{Þå½Å¾Ü\ÿþøˆšˆH<48>&$$MFDÆÁÿÿÿÿÿÿÿ½ÿÿÿÿÿÿøP<C3B8>ˆC“AñD$!ÈB8¦ÉÿÿÿÿÿÿÿÃÿÿÿÿÿÿøP<C3B8>ˆL!D$&HB¦Åÿÿÿÿÿÿÿÿÿÿÿÿÿÿø <20>ˆÈ†$$HFDÆÊÕUUUUUUUUUUUUUX <20>gGRà…Ãè:8ÆÄªªªªªªªªªªªªªª¨¦Èªªªªªªªªªªªªªª¨¦ÀÕUUUUUUUUUUUUU_ÿÿÿÿÿÿÿÿÿÿÿÿÿÆÀÕUUUUUUUUUUUUUUUUUUUUUUUUUUUFÀªªªªªªªªªªªªªªªªªªªªªªªªªªªª¦Àªªªªªªªªªªªªªªªªªªªªªªªªªªªª¦ÀÕUUUUUUUUUUUUUUUUUUUUUUUUUUUFÀÕUUUUUUUUUUUUUUUUUUUUUUUUUUUFÀÀÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþ
Selecting any of these final menu items will load the corresponding file. In addition, the Spy menu item will evaluate the form (SPY.BUTTON) after loading the file Spy.
INTERFACE
(LOADMENUITEMS group utilDescr1 utilDescr2 ...) [FilePackageCommand]
Dumps out to the file a form that will add items to the background menu for loading utilDescr1, utilDescr2, ... Each item will be added to the group subitem of the "Load utility" item on the background menu; if group is NIL it defaults to "Misc".
In the simplest case, utilDescr is a LITATOM. This is used when you want to load a file without any extra initialization, and the file is on one of the directories in DIRECTORIES. Selecting the resulting item will evaluate (DOFILESLOAD 'utilDescr) and print an informative message in the prompt window when the DOFILESLOAD is finished. The added item will have the label utilDescr.
In the general case, utilDescr is a list. This is used when you want to specify an initialization form to be evaluated when the utility is loaded, or when the file description is not a LITATOM. In this case, selecting the menu item will evaluate (DOFILESLOAD (CAR 'utilDescr)). If utilDescr is a list of two elements, the CADR of utilDescr will be evaluated after the utility is loaded; otherwise an informative message will be printed in the prompt window. The added item will have as a label the first LITATOM in the CAR of utilDescr; this is the first file that will be loaded when the item is selected.
In each of the above cases, the item is removed from the background menu after the utility is loaded and initialized.
When a utility is loaded from the "Load utility" menu, the event is added to the history list. This way you can UNDO loading a utility.
Some illustrative examples:
;; This adds the item "VStats" to the "Misc" subitem
(LOADMENUITEMS NIL VStats)
;; Selecting the "Spy" item will load SPY and call SPY.BUTTON to bring up the spy button icon
(LOADMENUITEMS ProgrammingAids (Spy (SPY.BUTTON)))
;; This will add the item "GO" to the "Games" group
(LOADMENUITEMS Games (((SYSLOAD FROM {PHYLUM}<Foster>Lisp>) GO)))
;; These items are useful for Lafite users, but aren't always needed
(LOADMENUITEMS MailTools LafiteFind Undigestify MailScavenge)
FUNCTIONS
(AddLoadMenuItem group fileDescr startUpForm) [Function]
Add a menu item to the background menu that will load the files. The item will be added under the top level item "Load utility". group is the submenu name for this file; the default is Misc. fileDescr is a list that can be passed to DOFILESLOAD to load the files. startUpForm is an optional form that will be evaluated after the DOFILESLOAD; the default will print a nice message in the prompt window. The LOADMENUITEMS filepackage command described above expands to calls to AddLoadMenuItem.
AddLoadMenuItem is UNDOable.
(PickLoadUtilityItem utility-name &OPTIONAL group-name no-errors-p) [Function]
This is the programatic equivilent of selecting the item named utility-name from the "Load utility" item on the background menu. If group-name is given, only that group undher the "Load utility" item is searched for the utility; otherwise the entire menu item is searched. If multiple matching items are found, a continuable error is signaled. Proceeding from this error will let you pick one of the items to execute. If no matching items are found, a continuable error is signaled. The no-errors-p flag controls whether or not these errors are actually signaled: if no-errors-p it true, PickLoadUtilityItem ignores the errors. PickLoadUtilityItem return T if the utility was loaded, NIL otherwise. (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "") STARTINGPAGE# 119) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "") STARTINGPAGE# NIL) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "") STARTINGPAGE# NIL) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))))) 6´ÀÈ ÈT3ÈÈT3ÈÈT2ÈÈ2ÈÈ5ÈÈ5È È5È È,È,ŠŠ8HÈÈ PAGEHEADING RUNNINGHEAD CLASSICCLASSICCLASSICTERMINAL
MODERN MODERN
MODERN
MODERN MODERN
    HRULE.GETFNMODERN
 
  HRULE.GETFN

 HRULE.GETFNMODERN    
Í © P        p BMOBJ.GETFN3MODERN
  #         ö BMOBJ.GETFN3MODERN
 \ "  
  T

& ?   Š < ~   í  ( ¼ H v   5 ^ 35 A F = 
 
ƒ 3  B Û  
 
? :
^ F { /9²zº