aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.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/image.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/image.c')
-rw-r--r--src/image.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/image.c b/src/image.c
index b3d2be88b96..20ca3cf1d6b 100644
--- a/src/image.c
+++ b/src/image.c
@@ -137,6 +137,7 @@ static void free_color_table (void);
137static unsigned long *colors_in_color_table (int *n); 137static unsigned long *colors_in_color_table (int *n);
138static unsigned long lookup_pixel_color (struct frame *f, unsigned long p); 138static unsigned long lookup_pixel_color (struct frame *f, unsigned long p);
139#endif 139#endif
140INFUN (Finit_image_library, 2);
140 141
141/* Code to deal with bitmaps. Bitmaps are referenced by their bitmap 142/* Code to deal with bitmaps. Bitmaps are referenced by their bitmap
142 id, which is just an int that this section returns. Bitmaps are 143 id, which is just an int that this section returns. Bitmaps are
@@ -7869,7 +7870,7 @@ static struct image_type imagemagick_type =
7869 }; 7870 };
7870 7871
7871 7872
7872DEFUN ("imagemagick-types", Fimagemagick_types, Simagemagick_types, 0, 0, 0, 7873DEFUE ("imagemagick-types", Fimagemagick_types, Simagemagick_types, 0, 0, 0,
7873 doc: /* Return the image types supported by ImageMagick. 7874 doc: /* Return the image types supported by ImageMagick.
7874Note that ImageMagick recognizes many file-types that Emacs does not recognize 7875Note that ImageMagick recognizes many file-types that Emacs does not recognize
7875as images, such as .c. */) 7876as images, such as .c. */)
@@ -8580,7 +8581,7 @@ x_kill_gs_process (Pixmap pixmap, struct frame *f)
8580 8581
8581#if GLYPH_DEBUG 8582#if GLYPH_DEBUG
8582 8583
8583DEFUN ("imagep", Fimagep, Simagep, 1, 1, 0, 8584DEFUE ("imagep", Fimagep, Simagep, 1, 1, 0,
8584 doc: /* Value is non-nil if SPEC is a valid image specification. */) 8585 doc: /* Value is non-nil if SPEC is a valid image specification. */)
8585 (Lisp_Object spec) 8586 (Lisp_Object spec)
8586{ 8587{
@@ -8588,7 +8589,7 @@ DEFUN ("imagep", Fimagep, Simagep, 1, 1, 0,
8588} 8589}
8589 8590
8590 8591
8591DEFUN ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "") 8592DEFUE ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "")
8592 (Lisp_Object spec) 8593 (Lisp_Object spec)
8593{ 8594{
8594 int id = -1; 8595 int id = -1;