Guarantee files are auto-saved when Emacs is terminated by Android
* java/org/gnu/emacs/EmacsNative.java (shutDownEmacs): * java/org/gnu/emacs/EmacsService.java (onDestroy): New function. When invoked, call shut_down_emacs and await its completion. * src/android.c (android_shut_down_emacs, shutDownEmacs): New functions.
This commit is contained in:
@@ -321,6 +321,18 @@ public final class EmacsService extends Service
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void
|
||||
onDestroy ()
|
||||
{
|
||||
/* This function is called immediately before the system kills
|
||||
Emacs. In this respect, it is rather akin to a SIGDANGER
|
||||
signal, so force an auto-save accordingly. */
|
||||
|
||||
EmacsNative.shutDownEmacs ();
|
||||
super.onDestroy ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Functions from here on must only be called from the Emacs
|
||||
|
||||
Reference in New Issue
Block a user