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/font.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/font.c')
| -rw-r--r-- | src/font.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/font.c b/src/font.c index e01f67a95f6..a31a418e641 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -3762,7 +3762,7 @@ which kind of font it is. It must be one of `font-spec', `font-entity', | |||
| 3762 | wrong_type_argument (intern ("font-extra-type"), extra_type); | 3762 | wrong_type_argument (intern ("font-extra-type"), extra_type); |
| 3763 | } | 3763 | } |
| 3764 | 3764 | ||
| 3765 | DEFUN ("font-spec", Ffont_spec, Sfont_spec, 0, MANY, 0, | 3765 | DEFUE ("font-spec", Ffont_spec, Sfont_spec, 0, MANY, 0, |
| 3766 | doc: /* Return a newly created font-spec with arguments as properties. | 3766 | doc: /* Return a newly created font-spec with arguments as properties. |
| 3767 | 3767 | ||
| 3768 | ARGS must come in pairs KEY VALUE of font properties. KEY must be a | 3768 | ARGS must come in pairs KEY VALUE of font properties. KEY must be a |
| @@ -3866,7 +3866,7 @@ usage: (font-spec ARGS...) */) | |||
| 3866 | return spec; | 3866 | return spec; |
| 3867 | } | 3867 | } |
| 3868 | 3868 | ||
| 3869 | DEFUN ("copy-font-spec", Fcopy_font_spec, Scopy_font_spec, 1, 1, 0, | 3869 | DEFUE ("copy-font-spec", Fcopy_font_spec, Scopy_font_spec, 1, 1, 0, |
| 3870 | doc: /* Return a copy of FONT as a font-spec. */) | 3870 | doc: /* Return a copy of FONT as a font-spec. */) |
| 3871 | (Lisp_Object font) | 3871 | (Lisp_Object font) |
| 3872 | { | 3872 | { |
| @@ -3892,7 +3892,7 @@ DEFUN ("copy-font-spec", Fcopy_font_spec, Scopy_font_spec, 1, 1, 0, | |||
| 3892 | return new_spec; | 3892 | return new_spec; |
| 3893 | } | 3893 | } |
| 3894 | 3894 | ||
| 3895 | DEFUN ("merge-font-spec", Fmerge_font_spec, Smerge_font_spec, 2, 2, 0, | 3895 | DEFUE ("merge-font-spec", Fmerge_font_spec, Smerge_font_spec, 2, 2, 0, |
| 3896 | doc: /* Merge font-specs FROM and TO, and return a new font-spec. | 3896 | doc: /* Merge font-specs FROM and TO, and return a new font-spec. |
| 3897 | Every specified properties in FROM override the corresponding | 3897 | Every specified properties in FROM override the corresponding |
| 3898 | properties in TO. */) | 3898 | properties in TO. */) |
| @@ -3921,7 +3921,7 @@ properties in TO. */) | |||
| 3921 | return to; | 3921 | return to; |
| 3922 | } | 3922 | } |
| 3923 | 3923 | ||
| 3924 | DEFUN ("font-get", Ffont_get, Sfont_get, 2, 2, 0, | 3924 | DEFUE ("font-get", Ffont_get, Sfont_get, 2, 2, 0, |
| 3925 | doc: /* Return the value of FONT's property KEY. | 3925 | doc: /* Return the value of FONT's property KEY. |
| 3926 | FONT is a font-spec, a font-entity, or a font-object. | 3926 | FONT is a font-spec, a font-entity, or a font-object. |
| 3927 | KEY is any symbol, but these are reserved for specific meanings: | 3927 | KEY is any symbol, but these are reserved for specific meanings: |
| @@ -4053,7 +4053,7 @@ are to be displayed on. If omitted, the selected frame is used. */) | |||
| 4053 | 4053 | ||
| 4054 | #endif | 4054 | #endif |
| 4055 | 4055 | ||
| 4056 | DEFUN ("font-put", Ffont_put, Sfont_put, 3, 3, 0, | 4056 | DEFUE ("font-put", Ffont_put, Sfont_put, 3, 3, 0, |
| 4057 | doc: /* Set one property of FONT: give property KEY value VAL. | 4057 | doc: /* Set one property of FONT: give property KEY value VAL. |
| 4058 | FONT is a font-spec, a font-entity, or a font-object. | 4058 | FONT is a font-spec, a font-entity, or a font-object. |
| 4059 | 4059 | ||
| @@ -4087,7 +4087,7 @@ accepted by `font-spec'. */) | |||
| 4087 | return val; | 4087 | return val; |
| 4088 | } | 4088 | } |
| 4089 | 4089 | ||
| 4090 | DEFUN ("list-fonts", Flist_fonts, Slist_fonts, 1, 4, 0, | 4090 | DEFUE ("list-fonts", Flist_fonts, Slist_fonts, 1, 4, 0, |
| 4091 | doc: /* List available fonts matching FONT-SPEC on the current frame. | 4091 | doc: /* List available fonts matching FONT-SPEC on the current frame. |
| 4092 | Optional 2nd argument FRAME specifies the target frame. | 4092 | Optional 2nd argument FRAME specifies the target frame. |
| 4093 | Optional 3rd argument NUM, if non-nil, limits the number of returned fonts. | 4093 | Optional 3rd argument NUM, if non-nil, limits the number of returned fonts. |
| @@ -4181,7 +4181,7 @@ Optional 2nd argument FRAME, if non-nil, specifies the target frame. */) | |||
| 4181 | return val; | 4181 | return val; |
| 4182 | } | 4182 | } |
| 4183 | 4183 | ||
| 4184 | DEFUN ("font-xlfd-name", Ffont_xlfd_name, Sfont_xlfd_name, 1, 2, 0, | 4184 | DEFUE ("font-xlfd-name", Ffont_xlfd_name, Sfont_xlfd_name, 1, 2, 0, |
| 4185 | doc: /* Return XLFD name of FONT. | 4185 | doc: /* Return XLFD name of FONT. |
| 4186 | FONT is a font-spec, font-entity, or font-object. | 4186 | FONT is a font-spec, font-entity, or font-object. |
| 4187 | If the name is too long for XLFD (maximum 255 chars), return nil. | 4187 | If the name is too long for XLFD (maximum 255 chars), return nil. |
| @@ -4403,7 +4403,7 @@ where | |||
| 4403 | 4403 | ||
| 4404 | #if 0 | 4404 | #if 0 |
| 4405 | 4405 | ||
| 4406 | DEFUN ("font-drive-otf", Ffont_drive_otf, Sfont_drive_otf, 6, 6, 0, | 4406 | DEFUE ("font-drive-otf", Ffont_drive_otf, Sfont_drive_otf, 6, 6, 0, |
| 4407 | doc: /* Apply OpenType features on glyph-string GSTRING-IN. | 4407 | doc: /* Apply OpenType features on glyph-string GSTRING-IN. |
| 4408 | OTF-FEATURES specifies which features to apply in this format: | 4408 | OTF-FEATURES specifies which features to apply in this format: |
| 4409 | (SCRIPT LANGSYS GSUB GPOS) | 4409 | (SCRIPT LANGSYS GSUB GPOS) |
| @@ -4473,7 +4473,7 @@ glyph-string. */) | |||
| 4473 | return make_number (num); | 4473 | return make_number (num); |
| 4474 | } | 4474 | } |
| 4475 | 4475 | ||
| 4476 | DEFUN ("font-otf-alternates", Ffont_otf_alternates, Sfont_otf_alternates, | 4476 | DEFUE ("font-otf-alternates", Ffont_otf_alternates, Sfont_otf_alternates, |
| 4477 | 3, 3, 0, | 4477 | 3, 3, 0, |
| 4478 | doc: /* Return a list of alternate glyphs of CHARACTER in FONT-OBJECT. | 4478 | doc: /* Return a list of alternate glyphs of CHARACTER in FONT-OBJECT. |
| 4479 | OTF-FEATURES specifies which features of the font FONT-OBJECT to apply | 4479 | OTF-FEATURES specifies which features of the font FONT-OBJECT to apply |