Path: utzoo!utgpu!watserv1!ria!uwovax!chet From: chet@uwovax.uwo.ca Newsgroups: comp.emacs Subject: MicroEMACS 3.10 backup macro MS-DOS version Message-ID: <4717.25b4db46@uwovax.uwo.ca> Date: 18 Jan 90 01:53:26 GMT Lines: 21 ; the next macro is not part of MicroEMACS 3.10 ; it stores a copy of the original file with extension .BAK ; every time a buffer is written to a disk file ; -- Chet Creider (creider@csd.uwo.ca) 22 store-macro set %dotpos &sin $cfname "." !if &equ %dotpos 0 set %cflen &len $cfname set %dotpos &add %cflen 1 !endif set %dotpos &sub %dotpos 1 set %backup &mid $cfname 1 %dotpos set %backup &cat %backup ".bak" set %oldfile &cat $cfname " " set %backup &cat %oldfile %backup shell-command &cat "copy " %backup save-file !endm bind-to-key execute-macro-22 ^X^S