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

Re: creating a "scratch" fred window



On Wed Sep 22, Daniel Berger asks:
   I need a fred window that will not ask you to save it when you quit.  I tried
   to work around this by creating a window-save method that does nothing, but
   this did not seem to work.
You need to define a ccl::window-needs-saving-p method that always returns
nil. Then the system won't display the save dialog when you quit or
when you close the window (without saving). You may also want to change
the save-menu item update function using a function similar to the following:

(defun my-save-menu-item-update (item)
  (let ((front-window (front-window)))
    (if (and front-window
             (method-exists-p #'window-save front-window)
             (window-needs-saving-p front-window))
      (menu-item-enable item)
      (menu-item-disable item))))

mark