From cd64ea1d0df393beb93d1bdf19bd3990e3378f85 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 14 Apr 2011 12:34:42 -0700 Subject: [PATCH] * lisp.h (INFUN): Remove. Suggested by Dan Nicolaescu in . All uses spelled out. --- src/ChangeLog | 4 ++++ src/buffer.c | 4 ++-- src/callproc.c | 2 +- src/composite.c | 3 ++- src/dired.c | 2 +- src/doc.c | 5 +++-- src/editfns.c | 2 +- src/eval.c | 2 +- src/fileio.c | 2 +- src/image.c | 2 +- src/insdel.c | 2 +- src/keyboard.c | 7 ++++--- src/keymap.c | 4 ++-- src/lisp.h | 2 -- src/process.c | 4 ++-- src/syntax.c | 2 +- src/textprop.c | 3 ++- src/window.c | 10 ++++++---- 18 files changed, 35 insertions(+), 27 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8b566b0d95..29b2457e08 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-04-14 Paul Eggert + * lisp.h (INFUN): Remove. Suggested by Dan Nicolaescu in + . + All uses spelled out. + Don't publish debugger-only interfaces to other modules. * lisp.h (safe_debug_print, debug_output_compilation_hack): (verify_bytepos, count_markers): Move decls to the only modules diff --git a/src/buffer.c b/src/buffer.c index 7b543b80a2..c649836adb 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -100,8 +100,8 @@ static char buffer_permanent_local_flags[MAX_PER_BUFFER_VARS]; int last_per_buffer_idx; -INFUN (Fset_buffer_major_mode, 1); -INFUN (Fdelete_overlay, 1); +static Lisp_Object Fset_buffer_major_mode (Lisp_Object); +static Lisp_Object Fdelete_overlay (Lisp_Object); static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, int after, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3); diff --git a/src/callproc.c b/src/callproc.c index 57f058aa16..3726eb3cc7 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -96,7 +96,7 @@ int synch_process_retcode; /* Nonzero if this is termination due to exit. */ static int call_process_exited; -INFUN (Fgetenv_internal, 2); +static Lisp_Object Fgetenv_internal (Lisp_Object, Lisp_Object); static Lisp_Object call_process_kill (Lisp_Object fdpid) diff --git a/src/composite.c b/src/composite.c index cccc75cc1b..fab7cb86ba 100644 --- a/src/composite.c +++ b/src/composite.c @@ -158,7 +158,8 @@ static Lisp_Object Qauto_composition_function; auto-compositions. */ #define MAX_AUTO_COMPOSITION_LOOKBACK 3 -INFUN (Fcomposition_get_gstring, 4); +static Lisp_Object Fcomposition_get_gstring (Lisp_Object, Lisp_Object, + Lisp_Object, Lisp_Object); /* Temporary variable used in macros COMPOSITION_XXX. */ Lisp_Object composition_temp; diff --git a/src/dired.c b/src/dired.c index 20d5b58667..60d7bc6497 100644 --- a/src/dired.c +++ b/src/dired.c @@ -87,7 +87,7 @@ static Lisp_Object Qfile_attributes; static Lisp_Object Qfile_attributes_lessp; static int scmp (const char *, const char *, int); -INFUN (Ffile_attributes, 2); +static Lisp_Object Ffile_attributes (Lisp_Object, Lisp_Object); #ifdef WINDOWSNT Lisp_Object diff --git a/src/doc.c b/src/doc.c index a793011990..354aff8497 100644 --- a/src/doc.c +++ b/src/doc.c @@ -42,8 +42,9 @@ static char *get_doc_string_buffer; static int get_doc_string_buffer_size; static unsigned char *read_bytecode_pointer; -INFUN (Fdocumentation_property, 3); -INFUN (Fsnarf_documentation, 1); +static Lisp_Object Fdocumentation_property (Lisp_Object, Lisp_Object, + Lisp_Object); +static Lisp_Object Fsnarf_documentation (Lisp_Object); /* readchar in lread.c calls back here to fetch the next byte. If UNREADFLAG is 1, we unread a byte. */ diff --git a/src/editfns.c b/src/editfns.c index 30974e0b50..5e1dcce027 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -108,7 +108,7 @@ static void transpose_markers (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT); static Lisp_Object Qbuffer_access_fontify_functions; -INFUN (Fuser_full_name, 1); +static Lisp_Object Fuser_full_name (Lisp_Object); /* Symbol for the text property used to mark fields. */ diff --git a/src/eval.c b/src/eval.c index 4d0786fc0d..c068f5f3fb 100644 --- a/src/eval.c +++ b/src/eval.c @@ -142,7 +142,7 @@ static Lisp_Object funcall_lambda (Lisp_Object, size_t, Lisp_Object *); static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; static int interactive_p (int); static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); -INFUN (Ffetch_bytecode, 1); +static Lisp_Object Ffetch_bytecode (Lisp_Object); void init_eval_once (void) diff --git a/src/fileio.c b/src/fileio.c index b4a464940c..7f749536d5 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -144,7 +144,7 @@ Lisp_Object Qfile_name_history; static Lisp_Object Qcar_less_than_car; -INFUN (Fmake_symbolic_link, 3); +static Lisp_Object Fmake_symbolic_link (Lisp_Object, Lisp_Object, Lisp_Object); static int a_write (int, Lisp_Object, int, int, Lisp_Object *, struct coding_system *); static int e_write (int, Lisp_Object, int, int, struct coding_system *); diff --git a/src/image.c b/src/image.c index 5e5d3509ea..fb555725b8 100644 --- a/src/image.c +++ b/src/image.c @@ -137,7 +137,7 @@ static void free_color_table (void); static unsigned long *colors_in_color_table (int *n); static unsigned long lookup_pixel_color (struct frame *f, unsigned long p); #endif -INFUN (Finit_image_library, 2); +static Lisp_Object Finit_image_library (Lisp_Object, Lisp_Object); /* Code to deal with bitmaps. Bitmaps are referenced by their bitmap id, which is just an int that this section returns. Bitmaps are diff --git a/src/insdel.c b/src/insdel.c index 8733054e9c..82dce13af9 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -48,7 +48,7 @@ static void adjust_markers_for_replace (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT); static void adjust_point (EMACS_INT nchars, EMACS_INT nbytes); -INFUN (Fcombine_after_change_execute, 0); +static Lisp_Object Fcombine_after_change_execute (void); /* List of elements of the form (BEG-UNCHANGED END-UNCHANGED CHANGE-AMOUNT) describing changes which happened while combine_after_change_calls diff --git a/src/keyboard.c b/src/keyboard.c index 29062a77e3..28e7e5bd46 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -458,7 +458,8 @@ static void interrupt_signal (int signalnum); #ifdef SIGIO static void input_available_signal (int signo); #endif -INFUN (Fcommand_execute, 4); +static Lisp_Object (Fcommand_execute) (Lisp_Object, Lisp_Object, Lisp_Object, + Lisp_Object); static void handle_interrupt (void); static void quit_throw_to_read_char (void) NO_RETURN; static void timer_start_idle (void); @@ -1193,7 +1194,7 @@ This also exits all active minibuffers. */) Fthrow (Qtop_level, Qnil); } -INFUN (Fexit_recursive_edit, 0) NO_RETURN; +static Lisp_Object Fexit_recursive_edit (void) NO_RETURN; DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "", doc: /* Exit from the innermost recursive edit or minibuffer. */) (void) @@ -1204,7 +1205,7 @@ DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, error ("No recursive edit is in progress"); } -INFUN (Fabort_recursive_edit, 0) NO_RETURN; +static Lisp_Object Fabort_recursive_edit (void) NO_RETURN; 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) diff --git a/src/keymap.c b/src/keymap.c index ba958077f0..8713bcf127 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -71,7 +71,7 @@ static Lisp_Object where_is_cache; /* Which keymaps are reverse-stored in the cache. */ static Lisp_Object where_is_cache_keymaps; -INFUN (Flookup_key, 3); +static Lisp_Object Flookup_key (Lisp_Object, Lisp_Object, Lisp_Object); static Lisp_Object store_in_keymap (Lisp_Object, Lisp_Object, Lisp_Object); static void fix_submap_inheritance (Lisp_Object, Lisp_Object, Lisp_Object); @@ -957,7 +957,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def) return def; } -INFUN (Fcopy_keymap, 1); +static Lisp_Object Fcopy_keymap (Lisp_Object); static Lisp_Object copy_keymap_item (Lisp_Object elt) diff --git a/src/lisp.h b/src/lisp.h index d629c40198..09830a980f 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2276,8 +2276,6 @@ void staticpro (Lisp_Object *); appropriate prototype. */ #define EXFUN(fnname, maxargs) \ extern Lisp_Object fnname DEFUN_ARGS_ ## maxargs -#define INFUN(fnname, maxargs) \ - static Lisp_Object fnname DEFUN_ARGS_ ## maxargs /* Forward declarations for prototypes. */ struct window; diff --git a/src/process.c b/src/process.c index 0cec8977ad..741f2e363f 100644 --- a/src/process.c +++ b/src/process.c @@ -235,7 +235,7 @@ static int process_output_skip; #define process_output_delay_count 0 #endif -INFUN (Fget_process, 1); +static Lisp_Object Fget_process (Lisp_Object); static void create_process (Lisp_Object, char **, Lisp_Object); static int keyboard_bit_set (SELECT_TYPE *); static void deactivate_process (Lisp_Object); @@ -1084,7 +1084,7 @@ DEFUN ("process-query-on-exit-flag", } #ifdef DATAGRAM_SOCKETS -INFUN (Fprocess_datagram_address, 1); +static Lisp_Object Fprocess_datagram_address (Lisp_Object); #endif DEFUN ("process-contact", Fprocess_contact, Sprocess_contact, diff --git a/src/syntax.c b/src/syntax.c index ce203948b0..031409144b 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -141,7 +141,7 @@ static EMACS_INT find_start_begv; static int find_start_modiff; -INFUN (Fsyntax_table_p, 1); +static Lisp_Object Fsyntax_table_p (Lisp_Object); static Lisp_Object skip_chars (int, Lisp_Object, Lisp_Object, int); static Lisp_Object skip_syntaxes (int, Lisp_Object, Lisp_Object); static Lisp_Object scan_lists (EMACS_INT, EMACS_INT, EMACS_INT, int); diff --git a/src/textprop.c b/src/textprop.c index 7ce488334e..a0d7d2689c 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -76,7 +76,8 @@ static Lisp_Object interval_insert_behind_hooks; static Lisp_Object interval_insert_in_front_hooks; static void text_read_only (Lisp_Object) NO_RETURN; -INFUN (Fprevious_property_change, 3); +static Lisp_Object Fprevious_property_change (Lisp_Object, Lisp_Object, + Lisp_Object); /* Signal a `text-read-only' error. This function makes it easier diff --git a/src/window.c b/src/window.c index 9ee35025d3..5d05953561 100644 --- a/src/window.c +++ b/src/window.c @@ -3278,10 +3278,12 @@ change_window_heights (Lisp_Object window, int n) int window_select_count; -INFUN (Fset_window_margins, 3); -INFUN (Fset_window_fringes, 4); -INFUN (Fset_window_scroll_bars, 4); -INFUN (Fset_window_vscroll, 3); +static Lisp_Object Fset_window_margins (Lisp_Object, Lisp_Object, Lisp_Object); +static Lisp_Object Fset_window_fringes (Lisp_Object, Lisp_Object, Lisp_Object, + Lisp_Object); +static Lisp_Object Fset_window_scroll_bars (Lisp_Object, Lisp_Object, + Lisp_Object, Lisp_Object); +static Lisp_Object Fset_window_vscroll (Lisp_Object, Lisp_Object, Lisp_Object); static void run_funs (Lisp_Object funs) -- 2.20.1