diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-01-13 15:22:19 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-01-13 15:23:03 -0800 |
commit | 785adfcc8dee02ac544f80e4f7f8d3d5b2965981 (patch) | |
tree | 459b4653c384bd48ea961dbc5da46461a72d90fa /lib-src | |
parent | 564784766297a6f2e06434e2baa7a1d851672a36 (diff) | |
download | emacs-785adfcc8dee02ac544f80e4f7f8d3d5b2965981.tar.gz |
Don't say Fnext_read_file_uses_dialog_p is const
It's const only if a windowing system is not used; don't say it's
const otherwise. See:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00310.html
* lib-src/make-docfile.c (write_globals):
Add a special hack for Fnext_read_file_uses_dialog_p.
* src/fileio.c (next_read_file_uses_dialog_p): Remove.
Move guts back to ...
(Fnext_read_file_uses_dialog_p): ... here.
Don't declare as const, as make-docfile.c now has a special case
for this function. This is an ugly hack, but it's better than
lying to the compiler.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/ChangeLog | 6 | ||||
-rw-r--r-- | lib-src/make-docfile.c | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 969aac80124..e9205fdd12a 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2015-01-13 Paul Eggert <eggert@cs.ucla.edu> + + Don't say Fnext_read_file_uses_dialog_p is const + * make-docfile.c (write_globals): + Add a special hack for Fnext_read_file_uses_dialog_p. + 2015-01-13 Dmitry Antipov <dmantipov@yandex.ru> Support DEFUN attributes. diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 79d421a0a8e..741fa4bfa42 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -729,6 +729,18 @@ write_globals (void) if (globals[i].flags & DEFUN_const) fputs (" ATTRIBUTE_CONST", stdout); + else if (strcmp (globals[i].name, "Fnext_read_file_uses_dialog_p") + == 0) + { + /* It would be nice to have a cleaner way to deal with this + special hack. */ + fputs (("\n" + "#if ! (defined USE_GTK || defined USE_MOTIF \\\n" + " || defined HAVE_NS || defined HAVE_NTGUI)\n" + "\tATTRIBUTE_CONST\n" + "#endif\n"), + stdout); + } puts (";"); } |