1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-17 17:58:46 +00:00
Commit Graph

99855 Commits

Author SHA1 Message Date
Paul Eggert
9306c32edb * indent.c (val_compute_motion, val_vmotion): Now static. 2011-04-13 17:42:10 -07:00
Paul Eggert
cd44d2ebb4 * image.c: Make symbols static if they're not exported.
* dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
if USE_GTK.
* image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
(xpm_color_cache, ct_table, ct_colors_allocated): Now static.
2011-04-13 16:44:57 -07:00
Paul Eggert
ad9a7a06d4 * fringe.c (standard_bitmaps): Now static.
(max_used_fringe_bitmap): Now static, unless HAVE_NS.
2011-04-13 16:38:13 -07:00
Paul Eggert
816269316f * frame.c: Make symbols static if they're not exported.
(x_report_frame_params, make_terminal_frame): Now static.
(get_frame_param): Now static, unless HAVE_NS.
(x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
(x_get_resource_string): Remove; not used.
* frame.h (make_terminal_frame, x_report_frame_params):
(x_get_resource_string); Remove decls.
(x_fullscreen_adjust): Declare only if WINDOWSNT.
* lisp.h (get_frame_param): Declare only if HAVE_NS.
2011-04-13 16:35:33 -07:00
Paul Eggert
239f9db960 * font.c, fontset.c: Make symbols static if they're not exported.
* dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
(FACE_SUITABLE_FOR_CHAR_P): Use it.
* font.c (font_close_object): Now static.
* font.h (font_close_object): Remove.
* fontset.c (FONTSET_OBJLIST): Remove.
(free_realized_fontset) #if-0 the body, which does nothing.
(face_suitable_for_char_p): #if-0, as it's never called.
* fontset.h (face_suitable_for_char_p): Remove decl.
* xfaces.c (face_at_string_position): Use
FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
since 0 is always ASCII.
2011-04-13 16:22:35 -07:00
Paul Eggert
dfcf357982 * fns.c (weak_hash_tables): Now static. 2011-04-13 16:02:03 -07:00
Paul Eggert
5045092bb4 * fileio.c: Make symbols static if they're not exported.
(auto_saving, auto_save_mode_bits, auto_save_error_occurred):
(Vwrite_region_annotation_buffers): Now static.
2011-04-13 15:57:17 -07:00
Paul Eggert
57a96f5c91 * eval.c: Make symbols static if they're not exported.
(backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
* lisp.h (backtrace_list): Remove decl.
2011-04-13 15:53:58 -07:00
Paul Eggert
35f08c383e * emacs.c: Make symbols static if they're not exported.
(malloc_state_ptr, malloc_using_checking, syms_of_emacs):
(fatal_error_code, fatal_error_signal_hook, standard_args):
Now static.
(fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
(DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
(__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
* lisp.h (fatal_error_signal_hook): Remove decl.
(fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
2011-04-13 15:50:03 -07:00
Paul Eggert
f44bd759cb * editfns.c: Move a (normally-unused) function to its only use.
* editfns.c, lisp.h (get_operating_system_release): Remove.
* process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
worth the hassle of breaking this out.
2011-04-13 15:28:14 -07:00
Paul Eggert
b532497da4 * xterm.c: Make symbols static if they're not exported.
(x_raise_frame, x_lower_frame, x_wm_set_window_state):
(x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
(x_destroy_window, x_delete_display):
Now static.
(x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
(x_mouse_leave): Remove; unused.
* xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
(x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
(x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
Remove decls.
(x_mouse_leave): Declare only if WINDOWSNT.
(x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
(xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
USE_X_TOOLKIT.
2011-04-13 15:19:27 -07:00
Paul Eggert
1675728f00 * ftxfont.c: Make symbols static if they're not exported.
(ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
HAVE_FREETYPE.
* font.h (ftxfont_driver): Likewise.
2011-04-12 01:42:29 -07:00
Paul Eggert
e4cebfca13 * xfns.c: Make symbols static if they're not exported.
(x_last_font_name, x_display_info_for_name):
(x_set_foreground_color, x_set_background_color, x_set_mouse_color):
(x_set_cursor_color, x_set_border_pixel, x_set_border_color):
(x_set_cursor_type, x_set_icon_type, x_set_icon_name):
(x_set_scroll_bar_foreground, x_set_scroll_bar_background):
(x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
(last_show_tip_args): Now static.
(xic_defaut_fontset, xic_create_fontsetname): Define only if
defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
(x_screen_planes): Remove; unused.
* dispextern.h (x_screen_planes): Remove decl.
2011-04-12 01:39:43 -07:00
Paul Eggert
5bf46f0511 * dispnew.c: Make symbols static if they're not exported.
* dispextern.h (redraw_garbaged_frames, scrolling):
(increment_row_positions): Remove.
* dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
(delayed_size_change, glyph_matrix_count, glyph_pool_count):
Now static.
(redraw_garbaged_frames): Remove; unused.
2011-04-11 23:36:55 -07:00
Paul Eggert
435f4c28d3 * xfaces.c: Make symbols static if they're not exported.
* dispextern.h (ascii_face_of_lisp_face, free_realized_face):
Remove decls.
* xterm.h (defined_color): Remove decls.
(x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
* xfaces.c (tty_suppress_bold_inverse_default_colors_p):
(menu_face_changed_default, defined_color, free_realized_face):
(x_free_dpy_colors): Define only if USE_X_TOOLKIT.
(ascii_face_of_lisp_face): Remove; unused.
2011-04-11 23:27:22 -07:00
Paul Eggert
8524aef308 * xdisp.c: Make symbols static if they're not exported.
* dispextern.h (scratch_glyph_row, window_box_edges):
(glyph_to_pixel_coords, set_cursor_from_row):
(get_next_display_element, set_iterator_to_next):
(highlight_trailing_whitespace, frame_to_window_pixel_xy):
(show_mouse_face): Remove decls
* frame.h (message_buf_print): Likewise.
* lisp.h (pop_message, set_message, check_point_in_composition):
Likewise.
* xterm.h (set_vertical_scroll_bar): Likewise.
* xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
(message_buf_print, scratch_glyph_row, displayed_buffer):
(set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
(get_next_display_element, show_mouse_face, window_box_edges):
(frame_to_window_pixel_xy, check_point_in_composition):
(set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
(glyph_to_pixel_coords): Remove; unused.
2011-04-11 23:01:37 -07:00
Paul Eggert
16390cd253 * dired.c (file_name_completion): Now static.
* dbusbind.c (xd_in_read_queued_messages): Now static.
2011-04-11 22:20:44 -07:00
Paul Eggert
a25f4dfafb * lisp.h (circular_list_error, FOREACH): Remove; unused.
* data.c (circular_list_error): Remove.
2011-04-11 22:17:33 -07:00
Paul Eggert
14a9c8df7a * commands.h (last_point_position, last_point_position_buffer):
(last_point_position_window): Remove decls.
* keyboard.c: Make these variables static.
2011-04-11 00:02:21 -07:00
Paul Eggert
74ab6df507 * coding.h (coding, code_convert_region, encode_coding_gap): Remove
decls.
* coding.c (Vsjis_coding_system, Vbig5_coding_system):
(iso_code_class, detect_coding, code_convert_region): Now static.
(encode_coding_gap): Remove; unused.
2011-04-10 23:58:57 -07:00
Paul Eggert
38dfbee187 * chartab.c (chartab_chars, chartab_bits): Now static. 2011-04-10 23:50:34 -07:00
Paul Eggert
a2cb4e6346 * charset.h (charset_iso_8859_1): Remove decl.
* charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
Now static.
2011-04-10 23:48:18 -07:00
Paul Eggert
127198fdc7 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
* ccl.c (Vccl_program_table): Now static.
(check_ccl_update): Remove; unused.
2011-04-10 23:43:21 -07:00
Paul Eggert
d85b608f9c * category.c (SET_CATEGORY_SET, set_category_set): Move here.
* category.h: ... from here.
* category.c (check_category_table, set_category_set): Now static.
2011-04-10 23:28:35 -07:00
Paul Eggert
31cd66f38b * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
* lisp.h: Remove these decls.
2011-04-10 23:21:47 -07:00
Paul Eggert
c358e58758 * buffer.c (buffer_count): Remove unused var. 2011-04-10 23:15:21 -07:00
Paul Eggert
e78aecca60 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
so that it's not optimized away.
(bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
* dispextern.h (bidi_dump_cached_states): Remove, since it's
exported only to the debugger.
2011-04-10 23:13:04 -07:00
Paul Eggert
e192d7d324 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
* atimer.h (run_all_atimers): Removed; not exported.
2011-04-10 23:04:34 -07:00
Paul Eggert
9247002884 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
* font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
was inaccessible from Lisp.
(merge_font_spec): Likewise, renaming from Fmerge_font_spec.
* font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
2011-04-10 22:58:27 -07:00
Paul Eggert
244ed9077f alloc.c: Import and export fewer symbols, and remove unused items.
* lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
is defined.
(suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
it's not optimized away by whole-program optimization.
(message_enable_multibyte, free_misc): Remove.
(catchlist, handlerlist, mark_backtrace):
Declare only if BYTE_MARK_STACK.
(mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
* alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
(message_enable_multibyte): Remove decl.
(free_misc, interval_free_list, float_block, float_block_index):
(n_float_blocks, float_free_list, cons_block, cons_block_index):
(cons_free_list, last_marked_index):
Now static.
(suppress_checking, die): Define only if ENABLE_CHECKING is defined.
* eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
(mark_backtrace): Define only if BYTE_MARK_STACK.
* xdisp.c (message_enable_multibyte): Now static.
2011-04-10 21:39:49 -07:00
Paul Eggert
955cbe7b17 Declare Lisp_Object Q* variables to be 'static' if not exproted.
This makes it easier for human readers (and static analyzers)
to see whether these variables are used from other modules.
* alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
* ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
* data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
* font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
* lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
* sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
* xmenu.c, xselect.c:
Declare Q* vars static if they are not used in other modules.
* ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
* frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
Remove decls of unexported vars.
* keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
2011-04-10 20:39:45 -07:00
Paul Eggert
95c82688bc * lisp.h (DEFINE_FUNC): Make sname 'static'. 2011-04-10 18:47:57 -07:00
Paul Eggert
16a97296c0 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.
2011-04-10 18:41:15 -07:00
Paul Eggert
785bbd4224 * editfns.c (Fformat): Remove unreachable code.
2011-04-10  Paul Eggert  <eggert@cs.ucla.edu>
2011-04-10 11:02:59 -07:00
Paul Eggert
b2ded58d7e Fix more problems found by GCC 4.6.0's static checks. 2011-04-10 09:44:27 -07:00
Paul Eggert
12020a9e6d Keep doprnt.c around for now, as we might revamp and reuse it. 2011-04-10 09:33:22 -07:00
Paul Eggert
69d9a57ddc Merge from gnulib. 2011-04-10 09:00:46 -07:00
Paul Eggert
4073e53749 Merge from mainline. 2011-04-10 08:49:40 -07:00
Leo Liu
37f1c9309e Fix typo in tabulated-list-print-entry 2011-04-10 22:21:26 +08:00
Jim Meyering
368f40905f use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
* gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
return ssize_t not "int", and use size_t as the buffer length.
(emacs_gnutls_write): Likewise, and make the buffer pointer "const".
* gnutls.h: Update declarations.
* process.c (read_process_output): Use ssize_t, to match.
(send_process): Likewise.
2011-04-10 16:00:13 +02:00
Paul Eggert
da0e53381f Merge from mainline. 2011-04-09 20:24:44 -07:00
Paul Eggert
3fc4037235 * xdisp.c (message_nolog): Bring this back, inside "#if 0".
See <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8435#26>.
2011-04-09 19:27:15 -07:00
Paul Eggert
7d66342ce2 * xdisp.c (vmessage): Use a better test for character truncation. 2011-04-09 16:11:48 -07:00
Paul Eggert
1e69125eae * syntax.c (skip_chars): Likewise. 2011-04-09 15:51:22 -07:00
Paul Eggert
3ab1c7ce32 * editfns.c (Fformat): Likewise. 2011-04-09 15:39:14 -07:00
Paul Eggert
bbf47d44bf Mention potential integer overflow problems. 2011-04-09 15:34:58 -07:00
Paul Eggert
14f04e6b49 * chartab.c: Use similar style as for other recent patches. 2011-04-09 15:34:16 -07:00
Paul Eggert
f9a68bc5fc * casetab.c (set_identity, shuffle): Likewise. 2011-04-09 15:31:34 -07:00
Paul Eggert
9248994de4 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise. 2011-04-09 15:21:42 -07:00
Paul Eggert
3befa58386 * charset.c (load_charset_map): <, not <=, for optimization. 2011-04-09 13:46:34 -07:00