Interlisp.org HISTMENU 2 4 1 HISTMENU 1 4 Original Fugue version By: Danny Bobrow (Bobrow.PA@Xerox.COM) 2020 Medley 3.5 clean sheet reimplementation By: Michele Denber (mdenber@gmail.com) 2022 Medley merge of Michele Denber implementation into the Original Danny Bobrow version By: Matt Heffron (heffron@alumni.caltech.edu) INTRODUCTION HISTMENU is a Xerox Lisp (Medley, Lyric, or Koto) program that provides quick access to commands recently typed in the Exec window. The original HISTMENU was written by Danny Bobrow but seems to have been lost over time. This version was reverse engineered by Michele Denber from a running instance in an old sysout. The source for the Original Danny Bobrow version was located in the archive of Matt Heffron (with a slight? change that cannot be identified). That version is the basis of this implementation. OPERATION Load HISTMENU.LCOM from your local Lispusers directory. Then call (HistoryIcon [histMenuLength] [histMenuPosition] [histIconPosition]) or (HistoryMenu [histMenuLength] [histMenuPosition]) where histMenuLength optionally specifies the number of commands you want displayed. Default is the value of HistDefaultSlice which is set to 30 when HISTMENU is loaded. histMenuPosition optionally specifies a position on the display to place the menu. Default is to place it using the mouse. histIconPosition optionally specifies a position on the display to place the graphic icon for the History Window. CF"""""""" ˆˆˆˆˆˆˆˆ€ˆˆˆˆˆˆˆˆ€"""""""" #ÿÿÿÿÿÿþ ‹Â€Ž€$ $ Œ€Œ€$ &‰ Š‚n€‹€ €#Žxqd2 #‚" ‰”J ‰ˆ‚ ‰H€‰ˆ‚ ‰ˆ€"ˆ‚"$‰Š "È‚q ˆÀ€ˆÀ€"` "` ˆ €ˆ €" "0 ˆ€ˆ€"0 "0 ˆ€ˆ€"0 "0 ˆ˜€ˆ˜€"( "( ˆˆ€ˆˆ€"( "( ˆˆ€ˆˆ€"( "8 ˆ€ˆ€"0 #ÿÿÿÿÿþ ‹‚€Œ€(0F 8 Ä !Œ€?€00 8 ˜(€œÈ€'¢ !ÿÿÿÿÿÿ" ˆˆˆˆˆˆˆˆ€ˆˆˆˆˆˆˆˆ€"""""""" """""""" ˆˆˆˆˆˆˆˆ€(0.75 (DISPLAY 1)) 0 0 Default is to place it using the mouse. Calling HistoryMenu will create the window with only a standard window title style icon. Clicking Left on any menu item will REDO that command. Clicking Middle brings up a pop-up menu that lets you issue one of the four Programmer's Assistant commands REDO, FIX, UNDO, ?? plus an option Delete which removes that item from the History Menu. Clicking Right bring up a pop-up menu with the three standard options Bury, Move, and Shrink plus an option Update which updates the entries in the History Menu to again show the last n commands from the Exec window. HistMenu works by using BKSYSBUF to "type" the REDO, FIX, UNDO, or ?? command with the associated history event number, followed by a CR, into the window that currently is accepting input. If there was already something typed in that input, the command would be appended/inserted at the point of the caret and the command will not do what would be expected. Michele Denber made one change to the original HISTMENU. In the original, it would send the command to whatever window had the keyboard focus. So if you were in a TEdit window, clicking a HISTMENU itwm would place "REDO 354" in the TEdit window. This version only allows commands to go into a selected Exec window. When merging Michele's implementation into the Original version, I (Matt Heffron) disovered that this change makes the History Menu unusable in contexts like a Break or Error window unless it is under an Exec process. To remedy this, I added a global variable HistMenuExecOnly which must be non-NIL to enable the checking for restricting the imput to an Exec window. HistMenuExecOnly defaults to NIL. OPTIONS (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (72 72 468 648) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) 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)) (72 762 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (72 744 540 36) NIL) (TEXT NIL NIL (72 72 468 648) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) 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)) (252 762 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (72 744 540 36) NIL) (TEXT NIL NIL (72 72 468 648) NIL))))).È ..È.ŠŠ8.È .ŠŠ8JÈÈ PAGEHEADING RUNNINGHEADMODERN TERMINAL MODERN MODERN MODERN MODERN MODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN ?V / ‡º¤ EE2Z-lbÙ BMOBJ.GETFN5+ $$lFÚAÞBE Hrzº