aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.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/frame.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/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. */)
225 : Qnil); 225 : Qnil);
226} 226}
227 227
228DEFUN ("window-system", Fwindow_system, Swindow_system, 0, 1, 0, 228DEFUE ("window-system", Fwindow_system, Swindow_system, 0, 1, 0,
229 doc: /* The name of the window system that FRAME is displaying through. 229 doc: /* The name of the window system that FRAME is displaying through.
230The value is a symbol: 230The value is a symbol:
231 nil for a termcap frame (a character-only terminal), 231 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
856 return frame; 856 return frame;
857} 857}
858 858
859DEFUN ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e", 859DEFUE ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e",
860 doc: /* Select FRAME. 860 doc: /* Select FRAME.
861Subsequent editing commands apply to its selected window. 861Subsequent editing commands apply to its selected window.
862Optional argument NORECORD means to neither change the order of 862Optional argument NORECORD means to neither change the order of
@@ -894,14 +894,14 @@ to that frame. */)
894 return do_switch_frame (event, 0, 0, Qnil); 894 return do_switch_frame (event, 0, 0, Qnil);
895} 895}
896 896
897DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, 897DEFUE ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0,
898 doc: /* Return the frame that is now selected. */) 898 doc: /* Return the frame that is now selected. */)
899 (void) 899 (void)
900{ 900{
901 return selected_frame; 901 return selected_frame;
902} 902}
903 903
904DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, 904DEFUE ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0,
905 doc: /* Return the frame object that window WINDOW is on. */) 905 doc: /* Return the frame object that window WINDOW is on. */)
906 (Lisp_Object window) 906 (Lisp_Object window)
907{ 907{
@@ -909,7 +909,7 @@ DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0,
909 return XWINDOW (window)->frame; 909 return XWINDOW (window)->frame;
910} 910}
911 911
912DEFUN ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0, 912DEFUE ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0,
913 doc: /* Returns the topmost, leftmost window of FRAME. 913 doc: /* Returns the topmost, leftmost window of FRAME.
914If omitted, FRAME defaults to the currently selected frame. */) 914If omitted, FRAME defaults to the currently selected frame. */)
915 (Lisp_Object frame) 915 (Lisp_Object frame)
@@ -943,7 +943,7 @@ DEFUN ("active-minibuffer-window", Factive_minibuffer_window,
943 return minibuf_level ? minibuf_window : Qnil; 943 return minibuf_level ? minibuf_window : Qnil;
944} 944}
945 945
946DEFUN ("frame-root-window", Fframe_root_window, Sframe_root_window, 0, 1, 0, 946DEFUE ("frame-root-window", Fframe_root_window, Sframe_root_window, 0, 1, 0,
947 doc: /* Returns the root-window of FRAME. 947 doc: /* Returns the root-window of FRAME.
948If omitted, FRAME defaults to the currently selected frame. */) 948If omitted, FRAME defaults to the currently selected frame. */)
949 (Lisp_Object frame) 949 (Lisp_Object frame)
@@ -980,7 +980,7 @@ FRAME defaults to the currently selected frame. */)
980 return window; 980 return window;
981} 981}
982 982
983DEFUN ("set-frame-selected-window", Fset_frame_selected_window, 983DEFUE ("set-frame-selected-window", Fset_frame_selected_window,
984 Sset_frame_selected_window, 2, 3, 0, 984 Sset_frame_selected_window, 2, 3, 0,
985 doc: /* Set selected window of FRAME to WINDOW. 985 doc: /* Set selected window of FRAME to WINDOW.
986If FRAME is nil, use the selected frame. If FRAME is the 986If FRAME is nil, use the selected frame. If FRAME is the
@@ -1776,7 +1776,7 @@ before calling this function on it, like this.
1776 1776
1777static void make_frame_visible_1 (Lisp_Object); 1777static void make_frame_visible_1 (Lisp_Object);
1778 1778
1779DEFUN ("make-frame-visible", Fmake_frame_visible, Smake_frame_visible, 1779DEFUE ("make-frame-visible", Fmake_frame_visible, Smake_frame_visible,
1780 0, 1, "", 1780 0, 1, "",
1781 doc: /* Make the frame FRAME visible (assuming it is an X window). 1781 doc: /* Make the frame FRAME visible (assuming it is an X window).
1782If omitted, FRAME defaults to the currently selected frame. */) 1782If omitted, FRAME defaults to the currently selected frame. */)
@@ -1876,7 +1876,7 @@ displayed in the terminal. */)
1876 return Qnil; 1876 return Qnil;
1877} 1877}
1878 1878
1879DEFUN ("iconify-frame", Ficonify_frame, Siconify_frame, 1879DEFUE ("iconify-frame", Ficonify_frame, Siconify_frame,
1880 0, 1, "", 1880 0, 1, "",
1881 doc: /* Make the frame FRAME into an icon. 1881 doc: /* Make the frame FRAME into an icon.
1882If omitted, FRAME defaults to the currently selected frame. */) 1882If omitted, FRAME defaults to the currently selected frame. */)
@@ -1961,7 +1961,7 @@ DEFUN ("visible-frame-list", Fvisible_frame_list, Svisible_frame_list,
1961} 1961}
1962 1962
1963 1963
1964DEFUN ("raise-frame", Fraise_frame, Sraise_frame, 0, 1, "", 1964DEFUE ("raise-frame", Fraise_frame, Sraise_frame, 0, 1, "",
1965 doc: /* Bring FRAME to the front, so it occludes any frames it overlaps. 1965 doc: /* Bring FRAME to the front, so it occludes any frames it overlaps.
1966If FRAME is invisible or iconified, make it visible. 1966If FRAME is invisible or iconified, make it visible.
1967If you don't specify a frame, the selected frame is used. 1967If 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. */)
2014} 2014}
2015 2015
2016 2016
2017DEFUN ("redirect-frame-focus", Fredirect_frame_focus, Sredirect_frame_focus, 2017DEFUE ("redirect-frame-focus", Fredirect_frame_focus, Sredirect_frame_focus,
2018 1, 2, 0, 2018 1, 2, 0,
2019 doc: /* Arrange for keystrokes typed at FRAME to be sent to FOCUS-FRAME. 2019 doc: /* Arrange for keystrokes typed at FRAME to be sent to FOCUS-FRAME.
2020In other words, switch-frame events caused by events in FRAME will 2020In 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. */)
2392} 2392}
2393 2393
2394 2394
2395DEFUN ("frame-parameter", Fframe_parameter, Sframe_parameter, 2, 2, 0, 2395DEFUE ("frame-parameter", Fframe_parameter, Sframe_parameter, 2, 2, 0,
2396 doc: /* Return FRAME's value for parameter PARAMETER. 2396 doc: /* Return FRAME's value for parameter PARAMETER.
2397If FRAME is nil, describe the currently selected frame. */) 2397If FRAME is nil, describe the currently selected frame. */)
2398 (Lisp_Object frame, Lisp_Object parameter) 2398 (Lisp_Object frame, Lisp_Object parameter)
@@ -2470,7 +2470,7 @@ If FRAME is nil, describe the currently selected frame. */)
2470} 2470}
2471 2471
2472 2472
2473DEFUN ("modify-frame-parameters", Fmodify_frame_parameters, 2473DEFUE ("modify-frame-parameters", Fmodify_frame_parameters,
2474 Smodify_frame_parameters, 2, 2, 0, 2474 Smodify_frame_parameters, 2, 2, 0,
2475 doc: /* Modify the parameters of frame FRAME according to ALIST. 2475 doc: /* Modify the parameters of frame FRAME according to ALIST.
2476If FRAME is nil, it defaults to the selected frame. 2476If FRAME is nil, it defaults to the selected frame.