[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Info MCL Digest Digest V2 #14
- To: email@example.com
- Subject: Re: Info MCL Digest Digest V2 #14
- From: firstname.lastname@example.org
- Date: Sun, 16 Jan 94 11:46:23 EST
- Reply-to: <email@example.com>
- Sender: "dblamkins" <firstname.lastname@example.org>
Andrew Mickish (email@example.com) wrote:
>10) While developing my application, I frequently need to quit my lisp
> listener and load my files from scratch. However, this also kills all
> the FRED windows that I have brought up during my session. Is there
> any way to spawn a new lisp process without dumping my FRED windows?
I use the following code in my Init.Lisp file:
;; Remember open FRED windows when we quit.
(defconstant *window-logfile-name* "CCL:WorkFiles")
(flet ((remember-fred-files ()
:direction :output :if-exists :supersede)
(let ((fname (window-filename w)))
(when fname (print fname window-log))))
;I can't do (advise quit (remember-fred-files)), because quit is already
;bound to the Quit item in the File menu. To make advise work on quit, I'd
;have to bind the advised quit to the menu-item-action-function.
;This is simpler and faster, and who cares about portability?
(pushnew #'remember-fred-files *lisp-cleanup-functions*))
;; Reopen the files that were open last time we quit.
:direction :input :if-does-not-exist nil)
(when window-log (let ((fname))
(loop (setf fname (read window-log nil))
(when (probe-file fname)