[5 cents for today] auto source with exit 1-liner

Started by newdep, April 22, 2008, 01:07:52 PM

Previous topic - Next topic

newdep

Sometimes you want to save all your functions/defines./contexts from

the newlisp console or just log your activity. Well that can be done

with -L or -l but for the linux/unix users there is another option.



You can bind the console exit to a signal, because i work with xterm

it handles ctrl-4 as (quit). When I press it the function saves and exits.

(put it in your init.lsp, pressing ctrl-4 sources to newlisp.log and exits)



cltr-4 sources and exits, a normal ctrl-d / (exit) , cltr-c does nothing..


Quote(define (ctrl-4 sig) (append-file "newlisp.log" (string "n==" (date) "==n" (source) "n")) (exit)) (signal 3 'ctrl-4)


Enjoy..
-- (define? (Cornflakes))