diff options
| author | Paul Eggert | 2011-04-10 18:41:15 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-10 18:41:15 -0700 |
| commit | 16a97296c05ec9d5bb4ffeae9dce90fc63f578ed (patch) | |
| tree | 0801b434f760fd8dded7204501ffcdb82460720c /src/print.c | |
| parent | 785bbd422461295890087ced24bfd87504032d0c (diff) | |
| download | emacs-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/print.c')
| -rw-r--r-- | src/print.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/print.c b/src/print.c index f68f04ac5fa..f039b40aa60 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -526,7 +526,7 @@ static void print_preprocess (Lisp_Object obj); | |||
| 526 | static void print_preprocess_string (INTERVAL interval, Lisp_Object arg); | 526 | static void print_preprocess_string (INTERVAL interval, Lisp_Object arg); |
| 527 | static void print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag); | 527 | static void print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag); |
| 528 | 528 | ||
| 529 | DEFUN ("terpri", Fterpri, Sterpri, 0, 1, 0, | 529 | DEFUE ("terpri", Fterpri, Sterpri, 0, 1, 0, |
| 530 | doc: /* Output a newline to stream PRINTCHARFUN. | 530 | doc: /* Output a newline to stream PRINTCHARFUN. |
| 531 | If PRINTCHARFUN is omitted or nil, the value of `standard-output' is used. */) | 531 | If PRINTCHARFUN is omitted or nil, the value of `standard-output' is used. */) |
| 532 | (Lisp_Object printcharfun) | 532 | (Lisp_Object printcharfun) |
| @@ -541,7 +541,7 @@ If PRINTCHARFUN is omitted or nil, the value of `standard-output' is used. */) | |||
| 541 | return Qt; | 541 | return Qt; |
| 542 | } | 542 | } |
| 543 | 543 | ||
| 544 | DEFUN ("prin1", Fprin1, Sprin1, 1, 2, 0, | 544 | DEFUE ("prin1", Fprin1, Sprin1, 1, 2, 0, |
| 545 | doc: /* Output the printed representation of OBJECT, any Lisp object. | 545 | doc: /* Output the printed representation of OBJECT, any Lisp object. |
| 546 | Quoting characters are printed when needed to make output that `read' | 546 | Quoting characters are printed when needed to make output that `read' |
| 547 | can handle, whenever this is possible. For complex objects, the behavior | 547 | can handle, whenever this is possible. For complex objects, the behavior |
| @@ -579,7 +579,7 @@ is used instead. */) | |||
| 579 | /* a buffer which is used to hold output being built by prin1-to-string */ | 579 | /* a buffer which is used to hold output being built by prin1-to-string */ |
| 580 | Lisp_Object Vprin1_to_string_buffer; | 580 | Lisp_Object Vprin1_to_string_buffer; |
| 581 | 581 | ||
| 582 | DEFUN ("prin1-to-string", Fprin1_to_string, Sprin1_to_string, 1, 2, 0, | 582 | DEFUE ("prin1-to-string", Fprin1_to_string, Sprin1_to_string, 1, 2, 0, |
| 583 | doc: /* Return a string containing the printed representation of OBJECT. | 583 | doc: /* Return a string containing the printed representation of OBJECT. |
| 584 | OBJECT can be any Lisp object. This function outputs quoting characters | 584 | OBJECT can be any Lisp object. This function outputs quoting characters |
| 585 | when necessary to make output that `read' can handle, whenever possible, | 585 | when necessary to make output that `read' can handle, whenever possible, |
| @@ -636,7 +636,7 @@ A printed representation of an object is text which describes that object. */) | |||
| 636 | return unbind_to (count, object); | 636 | return unbind_to (count, object); |
| 637 | } | 637 | } |
| 638 | 638 | ||
| 639 | DEFUN ("princ", Fprinc, Sprinc, 1, 2, 0, | 639 | DEFUE ("princ", Fprinc, Sprinc, 1, 2, 0, |
| 640 | doc: /* Output the printed representation of OBJECT, any Lisp object. | 640 | doc: /* Output the printed representation of OBJECT, any Lisp object. |
| 641 | No quoting characters are used; no delimiters are printed around | 641 | No quoting characters are used; no delimiters are printed around |
| 642 | the contents of strings. | 642 | the contents of strings. |
| @@ -670,7 +670,7 @@ is used instead. */) | |||
| 670 | return object; | 670 | return object; |
| 671 | } | 671 | } |
| 672 | 672 | ||
| 673 | DEFUN ("print", Fprint, Sprint, 1, 2, 0, | 673 | DEFUE ("print", Fprint, Sprint, 1, 2, 0, |
| 674 | doc: /* Output the printed representation of OBJECT, with newlines around it. | 674 | doc: /* Output the printed representation of OBJECT, with newlines around it. |
| 675 | Quoting characters are printed when needed to make output that `read' | 675 | Quoting characters are printed when needed to make output that `read' |
| 676 | can handle, whenever this is possible. For complex objects, the behavior | 676 | can handle, whenever this is possible. For complex objects, the behavior |
| @@ -813,7 +813,7 @@ safe_debug_print (Lisp_Object arg) | |||
| 813 | } | 813 | } |
| 814 | 814 | ||
| 815 | 815 | ||
| 816 | DEFUN ("error-message-string", Ferror_message_string, Serror_message_string, | 816 | DEFUE ("error-message-string", Ferror_message_string, Serror_message_string, |
| 817 | 1, 1, 0, | 817 | 1, 1, 0, |
| 818 | doc: /* Convert an error value (ERROR-SYMBOL . DATA) to an error message. | 818 | doc: /* Convert an error value (ERROR-SYMBOL . DATA) to an error message. |
| 819 | See Info anchor `(elisp)Definition of signal' for some details on how this | 819 | See Info anchor `(elisp)Definition of signal' for some details on how this |