home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 10
/
Fresh_Fish_10_2352.bin
/
useful
/
util
/
edit
/
mg
/
rexx
/
savesomebuffers.mg
< prev
next >
Wrap
Text File
|
1990-06-02
|
644b
|
30 lines
/*
* Emulates "save-some-buffers" for rexx macros, since the built-in one won't
* work from a Rexx macro (homework question for Amiga mg hackers: why?).
*/
options failat 2
options results
signal on failure
'rexx-buffer' start
'rexx-buffer-list' buffers
if buffers.0 = 0 then exit 0 /* No buffers to save! */
do buf = 1 to buffers.0
if buffers.buf.file ~= "" & word(buffers.buf.status, 1) = "CHANGED" then
do
'rexx-request "Save buffer' buffers.buf.name'? " '
if upper(left(result, 1)) = 'Y' then do
'switch-to-buffer' buffers.buf.name
'save-buffer'
end
end
end
'switch-to-buffer' start.1
return 0
failure:
return 2