summaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-04-10 18:41:15 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-04-10 18:41:15 -0700
commit16a97296c05ec9d5bb4ffeae9dce90fc63f578ed (patch)
tree0801b434f760fd8dded7204501ffcdb82460720c /src/frame.c
parent785bbd422461295890087ced24bfd87504032d0c (diff)
downloademacs-16a97296c05ec9d5bb4ffeae9dce90fc63f578ed.tar.gz
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/frame.c')
-rw-r--r--src/frame.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/frame.c b/src/frame.c
index 1b6d36092ae..6e0e9c4ffc0 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -225,7 +225,7 @@ return values. */)
: Qnil);
}
-DEFUN ("window-system", Fwindow_system, Swindow_system, 0, 1, 0,
+DEFUE ("window-system", Fwindow_system, Swindow_system, 0, 1, 0,
doc: /* The name of the window system that FRAME is displaying through.
The value is a symbol:
nil for a termcap frame (a character-only terminal),
@@ -856,7 +856,7 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor
return frame;
}
-DEFUN ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e",
+DEFUE ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e",
doc: /* Select FRAME.
Subsequent editing commands apply to its selected window.
Optional argument NORECORD means to neither change the order of
@@ -894,14 +894,14 @@ to that frame. */)
return do_switch_frame (event, 0, 0, Qnil);
}
-DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0,
+DEFUE ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0,
doc: /* Return the frame that is now selected. */)
(void)
{
return selected_frame;
}
-DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0,
+DEFUE ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0,
doc: /* Return the frame object that window WINDOW is on. */)
(Lisp_Object window)
{
@@ -909,7 +909,7 @@ DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0,
return XWINDOW (window)->frame;
}
-DEFUN ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0,
+DEFUE ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0,
doc: /* Returns the topmost, leftmost window of FRAME.
If omitted, FRAME defaults to the currently selected frame. */)
(Lisp_Object frame)
@@ -943,7 +943,7 @@ DEFUN ("active-minibuffer-window", Factive_minibuffer_window,
return minibuf_level ? minibuf_window : Qnil;
}
-DEFUN ("frame-root-window", Fframe_root_window, Sframe_root_window, 0, 1, 0,
+DEFUE ("frame-root-window", Fframe_root_window, Sframe_root_window, 0, 1, 0,
doc: /* Returns the root-window of FRAME.
If omitted, FRAME defaults to the currently selected frame. */)
(Lisp_Object frame)
@@ -980,7 +980,7 @@ FRAME defaults to the currently selected frame. */)
return window;
}
-DEFUN ("set-frame-selected-window", Fset_frame_selected_window,
+DEFUE ("set-frame-selected-window", Fset_frame_selected_window,
Sset_frame_selected_window, 2, 3, 0,
doc: /* Set selected window of FRAME to WINDOW.
If FRAME is nil, use the selected frame. If FRAME is the
@@ -1776,7 +1776,7 @@ before calling this function on it, like this.
static void make_frame_visible_1 (Lisp_Object);
-DEFUN ("make-frame-visible", Fmake_frame_visible, Smake_frame_visible,
+DEFUE ("make-frame-visible", Fmake_frame_visible, Smake_frame_visible,
0, 1, "",
doc: /* Make the frame FRAME visible (assuming it is an X window).
If omitted, FRAME defaults to the currently selected frame. */)
@@ -1876,7 +1876,7 @@ displayed in the terminal. */)
return Qnil;
}
-DEFUN ("iconify-frame", Ficonify_frame, Siconify_frame,
+DEFUE ("iconify-frame", Ficonify_frame, Siconify_frame,
0, 1, "",
doc: /* Make the frame FRAME into an icon.
If omitted, FRAME defaults to the currently selected frame. */)
@@ -1961,7 +1961,7 @@ DEFUN ("visible-frame-list", Fvisible_frame_list, Svisible_frame_list,
}
-DEFUN ("raise-frame", Fraise_frame, Sraise_frame, 0, 1, "",
+DEFUE ("raise-frame", Fraise_frame, Sraise_frame, 0, 1, "",
doc: /* Bring FRAME to the front, so it occludes any frames it overlaps.
If FRAME is invisible or iconified, make it visible.
If you don't specify a frame, the selected frame is used.
@@ -2014,7 +2014,7 @@ doesn't support multiple overlapping frames, this function does nothing. */)
}
-DEFUN ("redirect-frame-focus", Fredirect_frame_focus, Sredirect_frame_focus,
+DEFUE ("redirect-frame-focus", Fredirect_frame_focus, Sredirect_frame_focus,
1, 2, 0,
doc: /* Arrange for keystrokes typed at FRAME to be sent to FOCUS-FRAME.
In other words, switch-frame events caused by events in FRAME will
@@ -2392,7 +2392,7 @@ If FRAME is omitted, return information on the currently selected frame. */)
}
-DEFUN ("frame-parameter", Fframe_parameter, Sframe_parameter, 2, 2, 0,
+DEFUE ("frame-parameter", Fframe_parameter, Sframe_parameter, 2, 2, 0,
doc: /* Return FRAME's value for parameter PARAMETER.
If FRAME is nil, describe the currently selected frame. */)
(Lisp_Object frame, Lisp_Object parameter)
@@ -2470,7 +2470,7 @@ If FRAME is nil, describe the currently selected frame. */)
}
-DEFUN ("modify-frame-parameters", Fmodify_frame_parameters,
+DEFUE ("modify-frame-parameters", Fmodify_frame_parameters,
Smodify_frame_parameters, 2, 2, 0,
doc: /* Modify the parameters of frame FRAME according to ALIST.
If FRAME is nil, it defaults to the selected frame.