drop emacs_trailer from xml files.

Modern versions of emacs know, how to behave on xml files.
This commit is contained in:
Frank H. Ellenberger 2019-11-25 00:42:40 +01:00
parent 287b857a18
commit 91183a2af5
4 changed files with 4 additions and 27 deletions

View File

@ -425,8 +425,6 @@ gnc_write_example_account (GncExampleAccount* gea, const gchar* filename)
fprintf (out, "</" GNC_ACCOUNT_STRING ">\n\n");
write_emacs_trailer (out);
fclose (out);
return TRUE;

View File

@ -1601,8 +1601,7 @@ gnc_book_write_to_xml_file_v2 (
/* Try to write as much as possible */
if (!out
|| !gnc_book_write_to_xml_filehandle_v2 (book, out)
|| !write_emacs_trailer (out))
|| !gnc_book_write_to_xml_filehandle_v2 (book, out))
success = FALSE;
/* Close the output stream */
@ -1633,8 +1632,7 @@ gnc_book_write_accounts_to_xml_file_v2 (QofBackend* qof_be, QofBook* book,
/* Try to write as much as possible */
if (!out
|| !gnc_book_write_accounts_to_xml_filehandle_v2 (qof_be, book, out)
|| !write_emacs_trailer (out))
|| !gnc_book_write_accounts_to_xml_filehandle_v2 (qof_be, book, out))
success = FALSE;
/* Close the output stream */

View File

@ -33,23 +33,6 @@ extern "C"
#include "gnc-xml.h"
#include "io-utils.h"
#include "sixtp.h"
/*
<!-- Local variables: -->
<!-- mode: C -->
<!-- End: -->
*/
static const gchar* emacs_trailer =
"<!-- Local variables: -->\n"
"<!-- mode: xml -->\n"
"<!-- End: -->\n";
gboolean
write_emacs_trailer (FILE* out)
{
return fprintf (out, "%s", emacs_trailer) >= 0;
}
static gboolean
write_one_account (FILE* out,

View File

@ -37,7 +37,5 @@ gboolean write_accounts (FILE* out, QofBook* book, sixtp_gdv2* gd);
gboolean write_book_parts (FILE* out, QofBook* book);
gboolean write_commodities (FILE* out, QofBook* book, sixtp_gdv2* gd);
gboolean write_emacs_trailer (FILE* out);
#endif /* IO_UTILS_H */