HISTMENU

A LispUsers Package

Daniel G. Bobrow

revised: February 10, 1983 9:22 AM

The history menu package provides a simple way to access the history list using a menu. Through this menu one can REDO, UNDO, FIX, and ?? selected items. One can also delete selected items from the menu.

(
HistoryMenu N) will create a Menu of the last N history events in a HistoryWindow. HistItemsShown items of these N items will be seen on the menu. The rest may be seen by scrolling the menu. N defaults to HistDefaultSlice.

Selecting an item with LEFT in the window does a REDO on that item. Selecting with the MIDDLE button and then releasing the button causes a popup menu to be shown which provides a set of other options: FIX, UNDO, ??, and Delete. Selecting FIX, UNDO, and ?? cause that history operation to be done on the item selected. Look in the prompt window while holding down a button on an option in the popup menu to see what will happen if you let the button up. Clicking the RIGHT button in the window will bring up the usual window options, plus an UPDATE option which will update the menu to contain all current items.

Delete causes an item to be deleted from the menu (not the real history list). Deleting "unuseful" items allows more "good" items to appear in the same window space. Also, atomic items on the list BadHistoryItems will never appear on the History Menu. BadHistoryItems is initially (EDIT ?= OK T NIL ↑).

Update makes the menu contain all of the current slice of history. The History Menu is NOT automatically updated as you type in. However, after each deletion, the HistoryMenu is updated automatically if UpdateOnDeleteFlg is not NIL. UpdateOnDeleteFlg starts as T.

(
HistIcon N histPosition iconPosition) will create a history menu at histPosition, and then shrink it to a special picture icon (which looks like a scroll) located at iconPosition.

The HistoryWindow and HistoryMenu creation are controlled by the following parameters in addition to
BadHistoryItems and UpdateOnDeleteFlg.

NameInitial Value Explanation
HistDefaultSlice 30Number of items in HistoryMenu
HistItemsShown 51Number of items shown in window
HistMenuHeight 15Height of an item in the menu in screen bits
HistMenuWidth164Width of item in Menu in bits
HistWindowWidth164Width of HistoryWindow in bits.
HistEventWidth 60Maximum number of characters that will be
shown of the event in the prompt window