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

Re: Menu question



On Tue Jul 27, osiris writes:
  Now, I was wondering about the window-mwnu-items.  In the MCL manual, it
  states that the file menu item "Save" is enabled whenever the frontmost
  window has a window-save method defined for it, and a subsidiary function
  window-needs-saving-p returns true.  What I wanted to know is how is
  window-needs-saving-p called.  How do you tell MCL to check that function
  as well as chacking for the window-save method?  Do you use the
  menu-item-update procedure, or is there something else?

The ccl::save-menu-item-update function is called to enable/disable the
save menu item on the *file-menu*. The function in turn calls
window-needs-saving-p whichb you can specialize for your own windows.
For standard (non-fred) windows, there is no window-needs-saving-p
method. As a result, the save menu item is disabled. All you have to
do is supply a window-needs-saving-p method and a window-save method.


mark