aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorPaul Eggert2011-04-10 18:41:15 -0700
committerPaul Eggert2011-04-10 18:41:15 -0700
commit16a97296c05ec9d5bb4ffeae9dce90fc63f578ed (patch)
tree0801b434f760fd8dded7204501ffcdb82460720c /src/process.c
parent785bbd422461295890087ced24bfd87504032d0c (diff)
downloademacs-16a97296c05ec9d5bb4ffeae9dce90fc63f578ed.tar.gz
emacs-16a97296c05ec9d5bb4ffeae9dce90fc63f578ed.zip
Make Emacs functions such as Fatom 'static' by default.
This makes it easier for human readers (and static analyzers) to see whether these functions can be called from other modules. DEFUN now defines a static function. To make the function external so that it can be used in other C modules, use the new macro DEFUE. * lisp.h (DEFINE_FUNC): New macro, with the old contents of DEFUN. (DEFUN): Rewrite in terms of DEFINE_FUNC. It now generates a static function definition. Use DEFUE if you want an extern one. (DEFUE, INFUN): New macros. (Funibyte_char_to_multibyte, Fsyntax_table_p, Finit_image_library): (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer): (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute): (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes): Remove decls, since these functions are now static. (Funintern, Fget_internal_run_time): New decls, since these functions were already external. * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c: * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c: * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c: * fns.c, font.c, fontset.c, frame.c, image.c, indent.c: * keyboard.c, keymap.c, lread.c: * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c: * syntax.c, term.c, terminal.c, textprop.c, undo.c: * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c: Mark functions with DEFUE instead of DEFUN, if they are used in other modules. * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward decls for now-static functions. * buffer.h (Fdelete_overlay): Remove decl. * callproc.c (Fgetenv_internal): Mark as internal. * composite.c (Fremove_list_of_text_properties): Remove decl. (Fcomposition_get_gstring): New forward static decl. * composite.h (Fcomposite_get_gstring): Remove decl. * dired.c (Ffile_attributes): New forward static decl. * doc.c (Fdocumntation_property): New forward static decl. * eval.c (Ffetch_bytecode): New forward static decl. (Funintern): Remove extern decl; now in .h file where it belongs. * fileio.c (Fmake_symbolic_link): New forward static decl. * image.c (Finit_image_library): New forward static decl. * insdel.c (Fcombine_after_change_execute): Make forward decl static. * intervals.h (Fprevious_property_change): (Fremove_list_of_text_properties): Remove decls. * keyboard.c (Fthis_command_keys): Remove decl. (Fcommand_execute): New forward static decl. * keymap.c (Flookup_key): New forward static decl. (Fcopy_keymap): Now static. * keymap.h (Flookup_key): Remove decl. * process.c (Fget_process): New forward static decl. (Fprocess_datagram_address): Mark as internal. * syntax.c (Fsyntax_table_p): New forward static decl. (skip_chars): Remove duplicate decl. * textprop.c (Fprevious_property_change): New forward static decl. * window.c (Fset_window_fringes, Fset_window_scroll_bars): Now internal. (Fset_window_margins, Fset_window_vscroll): New forward static decls. * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/process.c b/src/process.c
index 624610069d8..ec96c1aa67e 100644
--- a/src/process.c
+++ b/src/process.c
@@ -235,6 +235,7 @@ static int process_output_skip;
235#define process_output_delay_count 0 235#define process_output_delay_count 0
236#endif 236#endif
237 237
238INFUN (Fget_process, 1);
238static int keyboard_bit_set (SELECT_TYPE *); 239static int keyboard_bit_set (SELECT_TYPE *);
239static void deactivate_process (Lisp_Object); 240static void deactivate_process (Lisp_Object);
240static void status_notify (struct Lisp_Process *); 241static void status_notify (struct Lisp_Process *);
@@ -782,7 +783,7 @@ nil, indicating the current buffer's process. */)
782 return Qnil; 783 return Qnil;
783} 784}
784 785
785DEFUN ("process-status", Fprocess_status, Sprocess_status, 1, 1, 0, 786DEFUE ("process-status", Fprocess_status, Sprocess_status, 1, 1, 0,
786 doc: /* Return the status of PROCESS. 787 doc: /* Return the status of PROCESS.
787The returned value is one of the following symbols: 788The returned value is one of the following symbols:
788run -- for a process that is running. 789run -- for a process that is running.
@@ -1083,7 +1084,7 @@ DEFUN ("process-query-on-exit-flag",
1083} 1084}
1084 1085
1085#ifdef DATAGRAM_SOCKETS 1086#ifdef DATAGRAM_SOCKETS
1086Lisp_Object Fprocess_datagram_address (Lisp_Object process); 1087INFUN (Fprocess_datagram_address, 1);
1087#endif 1088#endif
1088 1089
1089DEFUN ("process-contact", Fprocess_contact, Sprocess_contact, 1090DEFUN ("process-contact", Fprocess_contact, Sprocess_contact,
@@ -5775,7 +5776,7 @@ don't send the signal. */)
5775 return process; 5776 return process;
5776} 5777}
5777 5778
5778DEFUN ("kill-process", Fkill_process, Skill_process, 0, 2, 0, 5779DEFUE ("kill-process", Fkill_process, Skill_process, 0, 2, 0,
5779 doc: /* Kill process PROCESS. May be process or name of one. 5780 doc: /* Kill process PROCESS. May be process or name of one.
5780See function `interrupt-process' for more details on usage. */) 5781See function `interrupt-process' for more details on usage. */)
5781 (Lisp_Object process, Lisp_Object current_group) 5782 (Lisp_Object process, Lisp_Object current_group)
@@ -6915,7 +6916,7 @@ close_process_descs (void)
6915#endif 6916#endif
6916} 6917}
6917 6918
6918DEFUN ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0, 6919DEFUE ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0,
6919 doc: /* Return the (or a) process associated with BUFFER. 6920 doc: /* Return the (or a) process associated with BUFFER.
6920BUFFER may be a buffer or the name of one. */) 6921BUFFER may be a buffer or the name of one. */)
6921 (register Lisp_Object buffer) 6922 (register Lisp_Object buffer)
@@ -6982,8 +6983,8 @@ kill_buffer_processes (Lisp_Object buffer)
6982#endif /* subprocesses */ 6983#endif /* subprocesses */
6983} 6984}
6984 6985
6985DEFUN ("waiting-for-user-input-p", Fwaiting_for_user_input_p, Swaiting_for_user_input_p, 6986DEFUE ("waiting-for-user-input-p", Fwaiting_for_user_input_p,
6986 0, 0, 0, 6987 Swaiting_for_user_input_p, 0, 0, 0,
6987 doc: /* Returns non-nil if Emacs is waiting for input from the user. 6988 doc: /* Returns non-nil if Emacs is waiting for input from the user.
6988This is intended for use by asynchronous process output filters and sentinels. */) 6989This is intended for use by asynchronous process output filters and sentinels. */)
6989 (void) 6990 (void)