summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-06-17 09:09:19 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2014-06-17 09:09:19 -0700
commit73bfe891e2cf3e9b693938fe94c1ead1bc9b318d (patch)
treeb666e09276fdb67e80bdf05fa94649d98edb2b2f
parent319e8ddc53c72c94b570318adbb9726f1ae0418a (diff)
downloademacs-73bfe891e2cf3e9b693938fe94c1ead1bc9b318d.tar.gz
Omit redundant extern decls.
Most of this patch is from Dmitry Antipov, in: http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html * configure.ac (WERROR_CFLAGS): Add -Wredundant-decls. * lib-src/emacsclient.c (getenv): Remove decl. * lib-src/make-docfile.c (write_globals): Add ATTRIBUTE_CONST for Fbyteorder, Ftool_bar_height, Fmax_char, Fidentity. * lwlib/lwlib-Xm.c (lw_motif_widget_p, xm_update_one_value) (xm_create_dialog, xm_destroy_instance, xm_popup_menu) (xm_set_keyboard_focus, xm_set_main_areas): Remove decls. * src/commands.h (update_mode_lines): * src/frame.h (Qbackground_color, Qforeground_color) (x_set_menu_bar_lines): * src/ftfont.c (ftfont_font_format): * src/intervals.h (Qkeymap, Qfont): * src/keyboard.c (timer_check, safe_run_hooks, Qregion_extract_function): * src/lisp.h (Ffboundp, Qnil, Qt, Qlambda, Qintegerp, Qwholenump) (Qsymbolp, Qlisp, Qconsp, Qstringp, Qarrayp, Qbufferp, Qmarkerp) (Qvectorp, Qbuffer_or_string_p, Qchar_table_p, Qvector_or_char_table_p) (Qfloatp, Qnumberp, Qfont_spec, Qfont_entity, Qfont_object) (Fbyteorder, wrong_type_argument, Fmax_char, syms_of_composite) (Fidentity, extract_float, init_display, syms_of_display, Qdisplay): (Qimage, Qbox, redisplay_preserve_echo_area, char_table_ref) (char_table_set, char_table_translate, Qautoload, Qbottom, Qtop) (Qvisible, Qfont, Qfront_sticky, Qrear_nonsticky, init_sigio) (Qtool_bar, Qheader_line): * src/macros.c (Fexecute_kbd_macro): * src/xdisp.c (Ftool_bar_height, Ftool_bar_height): * src/xterm.c (x_delete_terminal, XSetIMValues): * src/xterm.h (x_set_window_size, x_query_color, x_get_focus_frame) (x_implicitly_set_name, popup_activated) (widget_store_internal_border): Remove redundant decls. * src/frame.c [USE_X_TOOLKIT]: Include widget.h. * src/keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit): Remove _Noreturn, as make-docfile now does that for us. * src/lisp.h (DEFUN): Don't declare fnname here; rely on make-docfile. (Qregion_extract_function): New decl. * src/window.c, src/xfns.c: Include menu.h.
-rw-r--r--ChangeLog12
-rw-r--r--configure.ac1
-rw-r--r--lib-src/ChangeLog7
-rw-r--r--lib-src/emacsclient.c4
-rw-r--r--lib-src/make-docfile.c13
-rw-r--r--lib/acl.h5
-rw-r--r--lwlib/ChangeLog8
-rw-r--r--lwlib/lwlib-Xm.c7
-rw-r--r--m4/gnulib-common.m43
-rw-r--r--src/ChangeLog35
-rw-r--r--src/commands.h4
-rw-r--r--src/frame.c3
-rw-r--r--src/frame.h2
-rw-r--r--src/ftfont.c2
-rw-r--r--src/intervals.h2
-rw-r--r--src/keyboard.c8
-rw-r--r--src/lisp.h60
-rw-r--r--src/macros.c2
-rw-r--r--src/window.c1
-rw-r--r--src/xdisp.c5
-rw-r--r--src/xfns.c1
-rw-r--r--src/xterm.c14
-rw-r--r--src/xterm.h14
23 files changed, 109 insertions, 104 deletions
diff --git a/ChangeLog b/ChangeLog
index f74594e9b58..39ea1f54452 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2014-06-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ Omit redundant extern decls.
+ Most of this patch is from Dmitry Antipov, in:
+ http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html
+ * configure.ac (WERROR_CFLAGS): Add -Wredundant-decls.
+
+ Merge from gnulib, incorporating:
+ 2014-06-17 acl: port to gcc -Wredundant-decls
+ 2014-06-01 gnulib-common.m4: Fix typo in _GL_UNUSED_LABEL.
+ * lib/acl.h, m4/gnulib-common.m4: Update from gnulib.
+
2014-06-15 Glenn Morris <rgm@gnu.org>
* Makefile.in: Use `make -C' rather than `cd && make' throughout.
diff --git a/configure.ac b/configure.ac
index c24469a0bb0..56005b51e22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -882,6 +882,7 @@ else
for w in $ws; do
gl_WARN_ADD([$w])
done
+ gl_WARN_ADD([-Wredundant-decls]) # Prefer this, as we don't use Bison.
gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one
gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now
gl_WARN_ADD([-Wno-type-limits]) # Too many warnings for now
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index ba801f024db..1fc9fcdb1f5 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,10 @@
+2014-06-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ Omit redundant extern decls.
+ * emacsclient.c (getenv): Remove decl.
+ * make-docfile.c (write_globals): Add ATTRIBUTE_CONST for
+ Fbyteorder, Ftool_bar_height, Fmax_char, Fidentity.
+
2014-06-15 Glenn Morris <rgm@gnu.org>
* Makefile.in (LDFLAGS): Explicitly set via configure.
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index a1177f54576..ddc1b6de5e3 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -82,10 +82,6 @@ char *w32_getenv (char *);
#include <signal.h>
#include <errno.h>
-
-
-char *getenv (const char *);
-
#ifndef VERSION
#define VERSION "unspecified"
#endif
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index 2eb2413815e..15ffa138b51 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -665,6 +665,7 @@ write_globals (void)
|| strcmp (globals[i].name, "Fexit_recursive_edit") == 0
|| strcmp (globals[i].name, "Fabort_recursive_edit") == 0)
fprintf (outfile, "_Noreturn ");
+
fprintf (outfile, "EXFUN (%s, ", globals[i].name);
if (globals[i].value == -1)
fprintf (outfile, "MANY");
@@ -672,7 +673,17 @@ write_globals (void)
fprintf (outfile, "UNEVALLED");
else
fprintf (outfile, "%d", globals[i].value);
- fprintf (outfile, ");\n");
+ fprintf (outfile, ")");
+
+ /* It would be nice to have a cleaner way to deal with these
+ special hacks, too. */
+ if (strcmp (globals[i].name, "Fbyteorder") == 0
+ || strcmp (globals[i].name, "Ftool_bar_height") == 0
+ || strcmp (globals[i].name, "Fmax_char") == 0
+ || strcmp (globals[i].name, "Fidentity") == 0)
+ fprintf (outfile, " ATTRIBUTE_CONST");
+
+ fprintf (outfile, ";\n");
}
while (i + 1 < num_globals
diff --git a/lib/acl.h b/lib/acl.h
index d024f74ba67..f67e350df05 100644
--- a/lib/acl.h
+++ b/lib/acl.h
@@ -17,6 +17,9 @@
Written by Paul Eggert. */
+#ifndef _GL_ACL_H
+#define _GL_ACL_H 1
+
#include <stdbool.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -28,3 +31,5 @@ int set_acl (char const *, int, mode_t);
int qcopy_acl (char const *, int, char const *, int, mode_t);
int copy_acl (char const *, int, char const *, int, mode_t);
int chmod_or_fchmod (char const *, int, mode_t);
+
+#endif
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog
index 9f490396292..430add5a8b6 100644
--- a/lwlib/ChangeLog
+++ b/lwlib/ChangeLog
@@ -1,3 +1,11 @@
+2014-06-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ Omit redundant extern decls.
+ From Dmitry Antipov.
+ * lwlib-Xm.c (lw_motif_widget_p, xm_update_one_value)
+ (xm_create_dialog, xm_destroy_instance, xm_popup_menu)
+ (xm_set_keyboard_focus, xm_set_main_areas): Remove decls.
+
2014-06-15 Glenn Morris <rgm@gnu.org>
* Makefile.in ($(globals_h)): Use `make -C' rather than `cd && make'.
diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c
index 1026dd478af..4d48e64cb14 100644
--- a/lwlib/lwlib-Xm.c
+++ b/lwlib/lwlib-Xm.c
@@ -79,7 +79,6 @@ static destroyed_instance *make_destroyed_instance (char *, char *,
Boolean);
static void free_destroyed_instance (destroyed_instance*);
Widget first_child (Widget);
-Boolean lw_motif_widget_p (Widget);
static XmString resource_motif_string (Widget, char *);
static void destroy_all_children (Widget, int);
static void xm_update_label (widget_instance *, Widget, widget_value *);
@@ -99,7 +98,6 @@ static void xm_update_menu (widget_instance *, Widget, widget_value *,
static void xm_update_text (widget_instance *, Widget, widget_value *);
static void xm_update_text_field (widget_instance *, Widget,
widget_value *);
-void xm_update_one_value (widget_instance *, Widget, widget_value *);
static void activate_button (Widget, XtPointer, XtPointer);
static Widget make_dialog (char *, Widget, Boolean, char *, char *,
Boolean, Boolean, Boolean, int, int);
@@ -107,21 +105,16 @@ static destroyed_instance* find_matching_instance (widget_instance*);
static void mark_dead_instance_destroyed (Widget, XtPointer, XtPointer);
static void recenter_widget (Widget);
static Widget recycle_instance (destroyed_instance*);
-Widget xm_create_dialog (widget_instance*);
static Widget make_menubar (widget_instance*);
static void remove_grabs (Widget, XtPointer, XtPointer);
static Widget make_popup_menu (widget_instance*);
static Widget make_main (widget_instance*);
-void xm_destroy_instance (widget_instance*);
-void xm_popup_menu (Widget, XEvent *);
static void set_min_dialog_size (Widget);
static void do_call (Widget, XtPointer, enum do_call_type);
static void xm_generic_callback (Widget, XtPointer, XtPointer);
static void xm_nosel_callback (Widget, XtPointer, XtPointer);
static void xm_pull_down_callback (Widget, XtPointer, XtPointer);
static void xm_pop_down_callback (Widget, XtPointer, XtPointer);
-void xm_set_keyboard_focus (Widget, Widget);
-void xm_set_main_areas (Widget, Widget, Widget);
static void xm_internal_update_other_instances (Widget, XtPointer,
XtPointer);
static void xm_arm_callback (Widget, XtPointer, XtPointer);
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 1bb316bb157..35f6195204e 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -50,7 +50,8 @@ AC_DEFUN([gl_COMMON_BODY], [
#define _UNUSED_PARAMETER_ _GL_UNUSED
/* gcc supports the "unused" attribute on possibly unused labels, and
- g++ has since version 4.5. */
+ g++ has since version 4.5. Note to support C++ as well as C,
+ _GL_UNUSED_LABEL should be used with a trailing ; */
#if !defined __cplusplus || __GNUC__ > 4 \
|| (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
# define _GL_UNUSED_LABEL _GL_UNUSED
diff --git a/src/ChangeLog b/src/ChangeLog
index 7917953d09a..142415622ff 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,38 @@
+2014-06-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ Omit redundant extern decls.
+ Most of this patch is from Dmitry Antipov, in:
+ http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html
+ * commands.h (update_mode_lines):
+ * frame.h (Qbackground_color, Qforeground_color)
+ (x_set_menu_bar_lines):
+ * ftfont.c (ftfont_font_format):
+ * intervals.h (Qkeymap, Qfont):
+ * keyboard.c (timer_check, safe_run_hooks, Qregion_extract_function):
+ * lisp.h (Ffboundp, Qnil, Qt, Qlambda, Qintegerp, Qwholenump)
+ (Qsymbolp, Qlisp, Qconsp, Qstringp, Qarrayp, Qbufferp, Qmarkerp)
+ (Qvectorp, Qbuffer_or_string_p, Qchar_table_p, Qvector_or_char_table_p)
+ (Qfloatp, Qnumberp, Qfont_spec, Qfont_entity, Qfont_object)
+ (Fbyteorder, wrong_type_argument, Fmax_char, syms_of_composite)
+ (Fidentity, extract_float, init_display, syms_of_display, Qdisplay):
+ (Qimage, Qbox, redisplay_preserve_echo_area, char_table_ref)
+ (char_table_set, char_table_translate, Qautoload, Qbottom, Qtop)
+ (Qvisible, Qfont, Qfront_sticky, Qrear_nonsticky, init_sigio)
+ (Qtool_bar, Qheader_line):
+ * macros.c (Fexecute_kbd_macro):
+ * xdisp.c (Ftool_bar_height, Ftool_bar_height):
+ * xterm.c (x_delete_terminal, XSetIMValues):
+ * xterm.h (x_set_window_size, x_query_color, x_get_focus_frame)
+ (x_implicitly_set_name, popup_activated)
+ (widget_store_internal_border):
+ Remove redundant decls.
+ * frame.c [USE_X_TOOLKIT]: Include widget.h.
+ * keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit):
+ Remove _Noreturn, as make-docfile now does that for us.
+ * lisp.h (DEFUN): Don't declare fnname here; rely on make-docfile.
+ (Qregion_extract_function): New decl.
+ * window.c, xfns.c: Include menu.h.
+
2014-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
* callint.c (Fcall_interactively): Fix up last change (bug#17701).
diff --git a/src/commands.h b/src/commands.h
index 36e3518b5ea..1a09f683563 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -39,7 +39,3 @@ extern Lisp_Object unread_switch_frame;
/* Nonzero if input is coming from the keyboard. */
#define INTERACTIVE (NILP (Vexecuting_kbd_macro) && !noninteractive)
-
-/* Set this nonzero to force reconsideration of mode line. */
-
-extern int update_mode_lines;
diff --git a/src/frame.c b/src/frame.c
index af2d3c39164..c67a233f099 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -50,6 +50,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "msdos.h"
#include "dosfns.h"
#endif
+#ifdef USE_X_TOOLKIT
+#include "widget.h"
+#endif
#ifdef HAVE_NS
Lisp_Object Qns_parse_geometry;
diff --git a/src/frame.h b/src/frame.h
index 44b113e3416..2da9fff2d4a 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1224,7 +1224,6 @@ extern Lisp_Object Qborder_color, Qborder_width;
extern Lisp_Object Qbuffer_predicate;
extern Lisp_Object Qcursor_color, Qcursor_type;
extern Lisp_Object Qfont;
-extern Lisp_Object Qbackground_color, Qforeground_color;
extern Lisp_Object Qicon, Qicon_name, Qicon_type, Qicon_left, Qicon_top;
extern Lisp_Object Qinternal_border_width;
extern Lisp_Object Qright_divider_width, Qbottom_divider_width;
@@ -1325,7 +1324,6 @@ extern void x_make_frame_visible (struct frame *f);
extern void x_make_frame_invisible (struct frame *f);
extern void x_iconify_frame (struct frame *f);
extern void x_set_frame_alpha (struct frame *f);
-extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
extern void x_activate_menubar (struct frame *);
extern void x_real_positions (struct frame *, int *, int *);
diff --git a/src/ftfont.c b/src/ftfont.c
index 112adad8a10..0f23b086cf5 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -87,8 +87,6 @@ static Lisp_Object ftfont_lookup_cache (Lisp_Object,
static void ftfont_filter_properties (Lisp_Object font, Lisp_Object alist);
-Lisp_Object ftfont_font_format (FcPattern *, Lisp_Object);
-
#define SYMBOL_FcChar8(SYM) (FcChar8 *) SDATA (SYMBOL_NAME (SYM))
static struct
diff --git a/src/intervals.h b/src/intervals.h
index e901f99747d..4e7a177140e 100644
--- a/src/intervals.h
+++ b/src/intervals.h
@@ -278,10 +278,8 @@ extern Lisp_Object Qpoint_entered;
extern Lisp_Object Qmodification_hooks;
extern Lisp_Object Qcategory;
extern Lisp_Object Qlocal_map;
-extern Lisp_Object Qkeymap;
/* Visual properties text (including strings) may have. */
-extern Lisp_Object Qfont;
extern Lisp_Object Qinvisible, Qintangible;
/* Sticky properties. */
diff --git a/src/keyboard.c b/src/keyboard.c
index 23f05407508..3e5e405d66e 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -356,7 +356,6 @@ static Lisp_Object Qecho_keystrokes;
static void recursive_edit_unwind (Lisp_Object buffer);
static Lisp_Object command_loop (void);
static Lisp_Object Qcommand_execute;
-struct timespec timer_check (void);
static void echo_now (void);
static ptrdiff_t echo_length (void);
@@ -1216,7 +1215,7 @@ user_error (const char *msg)
xsignal1 (Quser_error, build_string (msg));
}
-_Noreturn
+/* _Noreturn will be added to prototype by make-docfile. */
DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "",
doc: /* Exit from the innermost recursive edit or minibuffer. */)
(void)
@@ -1227,7 +1226,7 @@ DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0,
user_error ("No recursive edit is in progress");
}
-_Noreturn
+/* _Noreturn will be added to prototype by make-docfile. */
DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, 0, "",
doc: /* Abort the command that requested this recursive edit or minibuffer input. */)
(void)
@@ -1314,14 +1313,11 @@ some_mouse_moved (void)
static int read_key_sequence (Lisp_Object *, int, Lisp_Object,
bool, bool, bool, bool);
-void safe_run_hooks (Lisp_Object);
static void adjust_point_for_property (ptrdiff_t, bool);
/* The last boundary auto-added to buffer-undo-list. */
Lisp_Object last_undo_boundary;
-extern Lisp_Object Qregion_extract_function;
-
/* FIXME: This is wrong rather than test window-system, we should call
a new set-selection, which will then dispatch to x-set-selection, or
tty-set-selection, or w32-set-selection, ... */
diff --git a/src/lisp.h b/src/lisp.h
index 72ae5a1afda..8ad8e80da4b 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -832,12 +832,13 @@ extern Lisp_Object Qnumberp, Qstringp, Qsymbolp, Qt, Qvectorp;
extern Lisp_Object Qbool_vector_p;
extern Lisp_Object Qvector_or_char_table_p, Qwholenump;
extern Lisp_Object Qwindow;
-extern Lisp_Object Ffboundp (Lisp_Object);
extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
/* Defined in emacs.c. */
-extern bool initialized;
extern bool might_dump;
+/* True means Emacs has already been initialized.
+ Used during startup to detect startup of dumped Emacs. */
+extern bool initialized;
/* Defined in eval.c. */
extern Lisp_Object Qautoload;
@@ -2681,7 +2682,6 @@ CHECK_NUMBER_CDR (Lisp_Object x)
Lisp_Object fnname
#else /* not _MSC_VER */
#define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \
- Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \
static struct Lisp_Subr alignas (GCALIGNMENT) sname = \
{ { PVEC_SUBR << PSEUDOVECTOR_AREA_BITS }, \
{ .a ## maxargs = fnname }, \
@@ -3344,7 +3344,7 @@ set_sub_char_table_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val)
}
/* Defined in data.c. */
-extern Lisp_Object Qnil, Qt, Qquote, Qlambda, Qunbound;
+extern Lisp_Object Qquote, Qunbound;
extern Lisp_Object Qerror_conditions, Qerror_message, Qtop_level;
extern Lisp_Object Qerror, Qquit, Qargs_out_of_range;
extern Lisp_Object Qvoid_variable, Qvoid_function;
@@ -3355,26 +3355,18 @@ extern Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only;
extern Lisp_Object Qtext_read_only;
extern Lisp_Object Qinteractive_form;
extern Lisp_Object Qcircular_list;
-extern Lisp_Object Qintegerp, Qwholenump, Qsymbolp, Qlistp, Qconsp;
-extern Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp;
-extern Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp;
-extern Lisp_Object Qbuffer_or_string_p;
+extern Lisp_Object Qsequencep;
+extern Lisp_Object Qchar_or_string_p, Qinteger_or_marker_p;
extern Lisp_Object Qfboundp;
-extern Lisp_Object Qchar_table_p, Qvector_or_char_table_p;
extern Lisp_Object Qcdr;
extern Lisp_Object Qrange_error, Qoverflow_error;
-extern Lisp_Object Qfloatp;
-extern Lisp_Object Qnumberp, Qnumber_or_marker_p;
+extern Lisp_Object Qnumber_or_marker_p;
extern Lisp_Object Qbuffer, Qinteger, Qsymbol;
-extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
-
-EXFUN (Fbyteorder, 0) ATTRIBUTE_CONST;
-
/* Defined in data.c. */
extern Lisp_Object indirect_function (Lisp_Object);
extern Lisp_Object find_symbol_value (Lisp_Object);
@@ -3421,7 +3413,6 @@ extern struct Lisp_Symbol *indirect_variable (struct Lisp_Symbol *);
extern _Noreturn void args_out_of_range (Lisp_Object, Lisp_Object);
extern _Noreturn void args_out_of_range_3 (Lisp_Object, Lisp_Object,
Lisp_Object);
-extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
extern Lisp_Object do_symval_forwarding (union Lisp_Fwd *);
extern void set_internal (Lisp_Object, Lisp_Object, Lisp_Object, bool);
extern void syms_of_data (void);
@@ -3440,7 +3431,6 @@ extern void init_coding_once (void);
extern void syms_of_coding (void);
/* Defined in character.c. */
-EXFUN (Fmax_char, 0) ATTRIBUTE_CONST;
extern ptrdiff_t chars_in_text (const unsigned char *, ptrdiff_t);
extern ptrdiff_t multibyte_chars_in_text (const unsigned char *, ptrdiff_t);
extern int multibyte_char_to_unibyte (int) ATTRIBUTE_CONST;
@@ -3454,9 +3444,6 @@ extern void syms_of_charset (void);
/* Structure forward declarations. */
struct charset;
-/* Defined in composite.c. */
-extern void syms_of_composite (void);
-
/* Defined in syntax.c. */
extern void init_syntax_once (void);
extern void syms_of_syntax (void);
@@ -3464,7 +3451,6 @@ extern void syms_of_syntax (void);
/* Defined in fns.c. */
extern Lisp_Object QCrehash_size, QCrehash_threshold;
enum { NEXT_ALMOST_PRIME_LIMIT = 11 };
-EXFUN (Fidentity, 1) ATTRIBUTE_CONST;
extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST;
extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t);
extern void sweep_weak_hash_tables (void);
@@ -3497,7 +3483,6 @@ extern Lisp_Object string_make_unibyte (Lisp_Object);
extern void syms_of_fns (void);
/* Defined in floatfns.c. */
-extern double extract_float (Lisp_Object);
extern void syms_of_floatfns (void);
extern Lisp_Object fmod_float (Lisp_Object x, Lisp_Object y);
@@ -3518,6 +3503,7 @@ extern void syms_of_image (void);
/* Defined in insdel.c. */
extern Lisp_Object Qinhibit_modification_hooks;
+extern Lisp_Object Qregion_extract_function;
extern void move_gap_both (ptrdiff_t, ptrdiff_t);
extern _Noreturn void buffer_overflow (void);
extern void make_gap (ptrdiff_t);
@@ -3570,18 +3556,16 @@ _Noreturn void __executable_start (void);
#endif
extern Lisp_Object Vwindow_system;
extern Lisp_Object sit_for (Lisp_Object, bool, int);
-extern void init_display (void);
-extern void syms_of_display (void);
/* Defined in xdisp.c. */
extern Lisp_Object Qinhibit_point_motion_hooks;
-extern Lisp_Object Qinhibit_redisplay, Qdisplay;
+extern Lisp_Object Qinhibit_redisplay;
extern Lisp_Object Qmenu_bar_update_hook;
extern Lisp_Object Qwindow_scroll_functions;
extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
-extern Lisp_Object Qimage, Qtext, Qboth, Qboth_horiz, Qtext_image_horiz;
+extern Lisp_Object Qtext, Qboth, Qboth_horiz, Qtext_image_horiz;
extern Lisp_Object Qspace, Qcenter, QCalign_to;
-extern Lisp_Object Qbar, Qhbar, Qbox, Qhollow;
+extern Lisp_Object Qbar, Qhbar, Qhollow;
extern Lisp_Object Qleft_margin, Qright_margin;
extern Lisp_Object QCdata, QCfile;
extern Lisp_Object QCmap;
@@ -3608,7 +3592,6 @@ extern void message_log_maybe_newline (void);
extern void update_echo_area (void);
extern void truncate_echo_area (ptrdiff_t);
extern void redisplay (void);
-extern void redisplay_preserve_echo_area (int);
void set_frame_cursor_types (struct frame *, Lisp_Object);
extern void syms_of_xdisp (void);
@@ -3791,12 +3774,9 @@ extern void r_alloc_inhibit_buffer_relocation (int);
/* Defined in chartab.c. */
extern Lisp_Object copy_char_table (Lisp_Object);
-extern Lisp_Object char_table_ref (Lisp_Object, int);
extern Lisp_Object char_table_ref_and_range (Lisp_Object, int,
int *, int *);
-extern void char_table_set (Lisp_Object, int, Lisp_Object);
extern void char_table_set_range (Lisp_Object, int, int, Lisp_Object);
-extern int char_table_translate (Lisp_Object, int);
extern void map_char_table (void (*) (Lisp_Object, Lisp_Object,
Lisp_Object),
Lisp_Object, Lisp_Object, Lisp_Object);
@@ -3874,7 +3854,7 @@ intern_c_string (const char *str)
}
/* Defined in eval.c. */
-extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qmacro;
+extern Lisp_Object Qexit, Qinteractive, Qcommandp, Qmacro;
extern Lisp_Object Qinhibit_quit, Qinternal_interpreter_environment, Qclosure;
extern Lisp_Object Qand_rest;
extern Lisp_Object Vautoload_queue;
@@ -4082,8 +4062,7 @@ extern Lisp_Object echo_message_buffer;
extern struct kboard *echo_kboard;
extern void cancel_echoing (void);
extern Lisp_Object Qdisabled, QCfilter;
-extern Lisp_Object Qup, Qdown, Qbottom;
-extern Lisp_Object Qtop;
+extern Lisp_Object Qup, Qdown;
extern Lisp_Object last_undo_boundary;
extern bool input_pending;
extern Lisp_Object menu_bar_items (Lisp_Object);
@@ -4115,7 +4094,6 @@ extern void syms_of_indent (void);
/* Defined in frame.c. */
extern Lisp_Object Qonly, Qnone;
-extern Lisp_Object Qvisible;
extern void set_frame_param (struct frame *, Lisp_Object, Lisp_Object);
extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object);
extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object);
@@ -4235,9 +4213,8 @@ extern void record_property_change (ptrdiff_t, ptrdiff_t,
Lisp_Object);
extern void syms_of_undo (void);
/* Defined in textprop.c. */
-extern Lisp_Object Qfont, Qmouse_face;
+extern Lisp_Object Qmouse_face;
extern Lisp_Object Qinsert_in_front_hooks, Qinsert_behind_hooks;
-extern Lisp_Object Qfront_sticky, Qrear_nonsticky;
extern Lisp_Object Qminibuffer_prompt;
extern void report_interval_modification (Lisp_Object, Lisp_Object);
@@ -4260,7 +4237,6 @@ extern char *get_current_dir_name (void);
#endif
extern void stuff_char (char c);
extern void init_foreground_group (void);
-extern void init_sigio (int);
extern void sys_subshell (void);
extern void sys_suspend (void);
extern void discard_tty_input (void);
@@ -4345,8 +4321,8 @@ extern void syms_of_w32notify (void);
#endif
/* Defined in xfaces.c. */
-extern Lisp_Object Qdefault, Qtool_bar, Qfringe;
-extern Lisp_Object Qheader_line, Qscroll_bar, Qcursor;
+extern Lisp_Object Qdefault, Qfringe;
+extern Lisp_Object Qscroll_bar, Qcursor;
extern Lisp_Object Qmode_line_inactive;
extern Lisp_Object Qface;
extern Lisp_Object Qnormal;
@@ -4405,10 +4381,6 @@ extern void syms_of_profiler (void);
/* Defined in msdos.c, w32.c. */
extern char *emacs_root_dir (void);
#endif /* DOS_NT */
-
-/* True means Emacs has already been initialized.
- Used during startup to detect startup of dumped Emacs. */
-extern bool initialized;
/* True means ^G can quit instantly. */
extern bool immediate_quit;
diff --git a/src/macros.c b/src/macros.c
index d0cf3c2c58d..acba125edc5 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -45,8 +45,6 @@ EMACS_INT executing_kbd_macro_iterations;
Lisp_Object executing_kbd_macro;
-Lisp_Object Fexecute_kbd_macro (Lisp_Object macro, Lisp_Object count, Lisp_Object loopfunc);
-
DEFUN ("start-kbd-macro", Fstart_kbd_macro, Sstart_kbd_macro, 1, 2, "P",
doc: /* Record subsequent keyboard input, defining a keyboard macro.
The commands are recorded even as they are executed.
diff --git a/src/window.c b/src/window.c
index 46024614179..8a608433ed7 100644
--- a/src/window.c
+++ b/src/window.c
@@ -27,6 +27,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "buffer.h"
#include "keyboard.h"
#include "keymap.h"
+#include "menu.h"
#include "frame.h"
#include "window.h"
#include "commands.h"
diff --git a/src/xdisp.c b/src/xdisp.c
index d7368c7c0c4..70e4d1b5e59 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -12279,11 +12279,6 @@ tool_bar_height (struct frame *f, int *n_rows, bool pixelwise)
#endif /* !USE_GTK && !HAVE_NS */
-#if defined USE_GTK || defined HAVE_NS
-EXFUN (Ftool_bar_height, 2) ATTRIBUTE_CONST;
-EXFUN (Ftool_bar_lines_needed, 1) ATTRIBUTE_CONST;
-#endif
-
DEFUN ("tool-bar-height", Ftool_bar_height, Stool_bar_height,
0, 2, 0,
doc: /* Return the number of lines occupied by the tool bar of FRAME.
diff --git a/src/xfns.c b/src/xfns.c
index dc3211e4d6b..a7caa53e522 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -24,6 +24,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "lisp.h"
#include "xterm.h"
+#include "menu.h"
#include "frame.h"
#include "window.h"
#include "character.h"
diff --git a/src/xterm.c b/src/xterm.c
index 530bfe63dcb..c817174bb3f 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -226,7 +226,6 @@ static void x_lower_frame (struct frame *);
static const XColor *x_color_cells (Display *, int *);
static int x_io_error_quitter (Display *);
static struct terminal *x_create_terminal (struct x_display_info *);
-void x_delete_terminal (struct terminal *);
static void x_update_end (struct frame *);
static void XTframe_up_to_date (struct frame *);
static void x_clear_frame (struct frame *);
@@ -7859,11 +7858,6 @@ xim_destroy_callback (XIM xim, XPointer client_data, XPointer call_data)
#endif /* HAVE_X11R6 */
-#ifdef HAVE_X11R6
-/* This isn't prototyped in OSF 5.0 or 5.1a. */
-extern char *XSetIMValues (XIM, ...);
-#endif
-
/* Open the connection to the XIM server on display DPYINFO.
RESOURCE_NAME is the resource name Emacs uses. */
@@ -9779,7 +9773,7 @@ x_toggle_visible_pointer (struct frame *f, bool invisible)
else
XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
f->output_data.x->current_cursor);
- f->pointer_invisible = invisible;
+ f->pointer_invisible = invisible;
}
/* Setup pointer blanking, prefer Xfixes if available. */
@@ -10111,7 +10105,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
XRenderQueryExtension (dpyinfo->display, &event_base, &error_base);
- v = XGetDefault (dpyinfo->display, "Xft", "dpi");
+ v = XGetDefault (dpyinfo->display, "Xft", "dpi");
if (v != NULL && sscanf (v, "%lf", &d) == 1)
dpyinfo->resy = dpyinfo->resx = d;
}
@@ -10240,7 +10234,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
1, 0, 1);
x_setup_pointer_blanking (dpyinfo);
-
+
#ifdef HAVE_X_I18N
xim_initialize (dpyinfo, resource_name);
#endif
@@ -10556,7 +10550,7 @@ x_create_terminal (struct x_display_info *dpyinfo)
terminal->menu_show_hook = x_menu_show;
#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
terminal->popup_dialog_hook = xw_popup_dialog;
-#endif
+#endif
terminal->set_vertical_scroll_bar_hook = XTset_vertical_scroll_bar;
terminal->condemn_scroll_bars_hook = XTcondemn_scroll_bars;
terminal->redeem_scroll_bar_hook = XTredeem_scroll_bar;
diff --git a/src/xterm.h b/src/xterm.h
index 9daa478c964..6f6441a7f68 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -929,7 +929,6 @@ extern void x_check_errors (Display *, const char *)
extern bool x_had_errors_p (Display *);
extern void x_uncatch_errors (void);
extern void x_clear_errors (Display *);
-extern void x_set_window_size (struct frame *, int, int, int, bool);
extern void xembed_request_focus (struct frame *);
extern void x_ewmh_activate_frame (struct frame *);
extern void x_delete_terminal (struct terminal *terminal);
@@ -944,7 +943,6 @@ extern bool x_alloc_lighter_color_for_widget (Widget, Display *, Colormap,
double, int);
#endif
extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *);
-extern void x_query_color (struct frame *f, XColor *);
extern void x_clear_area (Display *, Window, int, int, int, int);
#if !defined USE_X_TOOLKIT && !defined USE_GTK
extern void x_mouse_leave (struct x_display_info *);
@@ -991,16 +989,11 @@ extern Lisp_Object x_property_data_to_lisp (struct frame *,
extern void x_clipboard_manager_save_frame (Lisp_Object);
extern void x_clipboard_manager_save_all (void);
-/* Defined in xfns.c */
-
-extern Lisp_Object x_get_focus_frame (struct frame *);
-
#ifdef USE_GTK
extern int xg_set_icon (struct frame *, Lisp_Object);
extern int xg_set_icon_from_xpm_data (struct frame *, const char **);
#endif /* USE_GTK */
-extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
extern void xic_free_xfontset (struct frame *);
extern void create_frame_xic (struct frame *);
extern void destroy_frame_xic (struct frame *);
@@ -1032,15 +1025,8 @@ extern Lisp_Object xw_popup_dialog (struct frame *, Lisp_Object, Lisp_Object);
extern void x_menu_set_in_use (int);
#endif
extern void x_menu_wait_for_event (void *data);
-extern int popup_activated (void);
extern void initialize_frame_menubar (struct frame *);
-/* Defined in widget.c */
-
-#ifdef USE_X_TOOLKIT
-extern void widget_store_internal_border (Widget);
-#endif
-
/* Defined in xsmfns.c */
#ifdef HAVE_X_SM
extern void x_session_initialize (struct x_display_info *dpyinfo);