ymacs
ymacs copied to clipboard
*** no error message given ***
I have this command:
Ymacs_Buffer.newCommands({
exit: Ymacs_Interactive(function() {
var buffs = ymacs.buffers.slice();
(function loop() {
var buff = buffs.shift();
if (buff) {
if (buff.name != '*scratch*' && buff.dirty()) {
var msg = 'Save file ' + buff.name + ' yes or no?';
function next() {
ymacs.killBuffer(buff);
loop();
}
buff.cmd('minibuffer_yn', msg, function(yes) {
if (yes) {
buff.cmd('save_buffer_with_continuation',
false,
next);
} else {
next();
}
});
} else {
next();
}
} else {
$('.DlDesktop').hide();
leash.terminal.focus(true);
}
})();
})
});
and when I call it using M-x and when there are no unsaved files I got exception: Uncaught s: *** no error message given ***
from thelib.js file.
It work fine If I call it from C-x C-c.
I don't get that error if I don't kill *scratch*
buffer.