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/chartab.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/chartab.c')
| -rw-r--r-- | src/chartab.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/chartab.c b/src/chartab.c index 7a0a3aabbb6..50c3fd7cb73 100644 --- a/src/chartab.c +++ b/src/chartab.c | |||
| @@ -54,7 +54,7 @@ const int chartab_bits[4] = | |||
| 54 | (((c) - (min_char)) >> chartab_bits[(depth)]) | 54 | (((c) - (min_char)) >> chartab_bits[(depth)]) |
| 55 | 55 | ||
| 56 | 56 | ||
| 57 | DEFUN ("make-char-table", Fmake_char_table, Smake_char_table, 1, 2, 0, | 57 | DEFUE ("make-char-table", Fmake_char_table, Smake_char_table, 1, 2, 0, |
| 58 | doc: /* Return a newly created char-table, with purpose PURPOSE. | 58 | doc: /* Return a newly created char-table, with purpose PURPOSE. |
| 59 | Each element is initialized to INIT, which defaults to nil. | 59 | Each element is initialized to INIT, which defaults to nil. |
| 60 | 60 | ||
| @@ -459,7 +459,7 @@ then the actual applicable value is inherited from the parent char-table | |||
| 459 | return XCHAR_TABLE (char_table)->parent; | 459 | return XCHAR_TABLE (char_table)->parent; |
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | DEFUN ("set-char-table-parent", Fset_char_table_parent, Sset_char_table_parent, | 462 | DEFUE ("set-char-table-parent", Fset_char_table_parent, Sset_char_table_parent, |
| 463 | 2, 2, 0, | 463 | 2, 2, 0, |
| 464 | doc: /* Set the parent char-table of CHAR-TABLE to PARENT. | 464 | doc: /* Set the parent char-table of CHAR-TABLE to PARENT. |
| 465 | Return PARENT. PARENT must be either nil or another char-table. */) | 465 | Return PARENT. PARENT must be either nil or another char-table. */) |
| @@ -483,7 +483,7 @@ Return PARENT. PARENT must be either nil or another char-table. */) | |||
| 483 | return parent; | 483 | return parent; |
| 484 | } | 484 | } |
| 485 | 485 | ||
| 486 | DEFUN ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot, | 486 | DEFUE ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot, |
| 487 | 2, 2, 0, | 487 | 2, 2, 0, |
| 488 | doc: /* Return the value of CHAR-TABLE's extra-slot number N. */) | 488 | doc: /* Return the value of CHAR-TABLE's extra-slot number N. */) |
| 489 | (Lisp_Object char_table, Lisp_Object n) | 489 | (Lisp_Object char_table, Lisp_Object n) |
| @@ -497,7 +497,7 @@ DEFUN ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot, | |||
| 497 | return XCHAR_TABLE (char_table)->extras[XINT (n)]; | 497 | return XCHAR_TABLE (char_table)->extras[XINT (n)]; |
| 498 | } | 498 | } |
| 499 | 499 | ||
| 500 | DEFUN ("set-char-table-extra-slot", Fset_char_table_extra_slot, | 500 | DEFUE ("set-char-table-extra-slot", Fset_char_table_extra_slot, |
| 501 | Sset_char_table_extra_slot, | 501 | Sset_char_table_extra_slot, |
| 502 | 3, 3, 0, | 502 | 3, 3, 0, |
| 503 | doc: /* Set CHAR-TABLE's extra-slot number N to VALUE. */) | 503 | doc: /* Set CHAR-TABLE's extra-slot number N to VALUE. */) |
| @@ -541,7 +541,7 @@ a cons of character codes (for characters in the range), or a character code. * | |||
| 541 | return val; | 541 | return val; |
| 542 | } | 542 | } |
| 543 | 543 | ||
| 544 | DEFUN ("set-char-table-range", Fset_char_table_range, Sset_char_table_range, | 544 | DEFUE ("set-char-table-range", Fset_char_table_range, Sset_char_table_range, |
| 545 | 3, 3, 0, | 545 | 3, 3, 0, |
| 546 | doc: /* Set the value in CHAR-TABLE for a range of characters RANGE to VALUE. | 546 | doc: /* Set the value in CHAR-TABLE for a range of characters RANGE to VALUE. |
| 547 | RANGE should be t (for all characters), nil (for the default value), | 547 | RANGE should be t (for all characters), nil (for the default value), |
| @@ -626,7 +626,7 @@ optimize_sub_char_table (Lisp_Object table, Lisp_Object test) | |||
| 626 | return (optimizable ? elt : table); | 626 | return (optimizable ? elt : table); |
| 627 | } | 627 | } |
| 628 | 628 | ||
| 629 | DEFUN ("optimize-char-table", Foptimize_char_table, Soptimize_char_table, | 629 | DEFUE ("optimize-char-table", Foptimize_char_table, Soptimize_char_table, |
| 630 | 1, 2, 0, | 630 | 1, 2, 0, |
| 631 | doc: /* Optimize CHAR-TABLE. | 631 | doc: /* Optimize CHAR-TABLE. |
| 632 | TEST is the comparison function used to decide whether two entries are | 632 | TEST is the comparison function used to decide whether two entries are |