aboutsummaryrefslogtreecommitdiffstats
path: root/src/casefiddle.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/casefiddle.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/casefiddle.c')
-rw-r--r--src/casefiddle.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 9f286d73a5e..7a220c81865 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -148,7 +148,7 @@ casify_object (enum case_action flag, Lisp_Object obj)
148 } 148 }
149} 149}
150 150
151DEFUN ("upcase", Fupcase, Supcase, 1, 1, 0, 151DEFUE ("upcase", Fupcase, Supcase, 1, 1, 0,
152 doc: /* Convert argument to upper case and return that. 152 doc: /* Convert argument to upper case and return that.
153The argument may be a character or string. The result has the same type. 153The argument may be a character or string. The result has the same type.
154The argument object is not altered--the value is a copy. 154The argument object is not altered--the value is a copy.
@@ -158,7 +158,7 @@ See also `capitalize', `downcase' and `upcase-initials'. */)
158 return casify_object (CASE_UP, obj); 158 return casify_object (CASE_UP, obj);
159} 159}
160 160
161DEFUN ("downcase", Fdowncase, Sdowncase, 1, 1, 0, 161DEFUE ("downcase", Fdowncase, Sdowncase, 1, 1, 0,
162 doc: /* Convert argument to lower case and return that. 162 doc: /* Convert argument to lower case and return that.
163The argument may be a character or string. The result has the same type. 163The argument may be a character or string. The result has the same type.
164The argument object is not altered--the value is a copy. */) 164The argument object is not altered--the value is a copy. */)
@@ -180,7 +180,7 @@ The argument object is not altered--the value is a copy. */)
180 180
181/* Like Fcapitalize but change only the initials. */ 181/* Like Fcapitalize but change only the initials. */
182 182
183DEFUN ("upcase-initials", Fupcase_initials, Supcase_initials, 1, 1, 0, 183DEFUE ("upcase-initials", Fupcase_initials, Supcase_initials, 1, 1, 0,
184 doc: /* Convert the initial of each word in the argument to upper case. 184 doc: /* Convert the initial of each word in the argument to upper case.
185Do not change the other letters of each word. 185Do not change the other letters of each word.
186The argument may be a character or string. The result has the same type. 186The argument may be a character or string. The result has the same type.
@@ -301,7 +301,7 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e)
301 } 301 }
302} 302}
303 303
304DEFUN ("upcase-region", Fupcase_region, Supcase_region, 2, 2, "r", 304DEFUE ("upcase-region", Fupcase_region, Supcase_region, 2, 2, "r",
305 doc: /* Convert the region to upper case. In programs, wants two arguments. 305 doc: /* Convert the region to upper case. In programs, wants two arguments.
306These arguments specify the starting and ending character numbers of 306These arguments specify the starting and ending character numbers of
307the region to operate on. When used as a command, the text between 307the region to operate on. When used as a command, the text between
@@ -338,7 +338,7 @@ character positions to operate on. */)
338 338
339/* Like Fcapitalize_region but change only the initials. */ 339/* Like Fcapitalize_region but change only the initials. */
340 340
341DEFUN ("upcase-initials-region", Fupcase_initials_region, 341DEFUE ("upcase-initials-region", Fupcase_initials_region,
342 Supcase_initials_region, 2, 2, "r", 342 Supcase_initials_region, 2, 2, "r",
343 doc: /* Upcase the initial of each word in the region. 343 doc: /* Upcase the initial of each word in the region.
344Subsequent letters of each word are not changed. 344Subsequent letters of each word are not changed.