bpt/emacs.git
13 years agoUndo the DEFUN->DEFUE change.
Paul Eggert [Thu, 14 Apr 2011 05:04:02 +0000 (22:04 -0700)]
Undo the DEFUN->DEFUE change.

13 years ago* xsettings.c, xsettings.h (xsettings_get_system_normal_font):
Paul Eggert [Thu, 14 Apr 2011 03:08:55 +0000 (20:08 -0700)]
* xsettings.c, xsettings.h (xsettings_get_system_normal_font):

Define only if USE_LUCID.

13 years ago* xrdb.c (x_customization_string, x_rm_string): Now static.
Paul Eggert [Thu, 14 Apr 2011 03:05:57 +0000 (20:05 -0700)]
* xrdb.c (x_customization_string, x_rm_string): Now static.

13 years ago* xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
Paul Eggert [Thu, 14 Apr 2011 03:04:14 +0000 (20:04 -0700)]
* xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.

* xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.

13 years ago* xdisp.c (draw_row_with_mouse_face): Now static.
Paul Eggert [Thu, 14 Apr 2011 03:01:10 +0000 (20:01 -0700)]
* xdisp.c (draw_row_with_mouse_face): Now static.

* dispextern.h (draw_row_with_mouse_fave): Remove decl.

13 years ago* window.h (check_all_windows): Mark externally visible.
Paul Eggert [Thu, 14 Apr 2011 02:58:21 +0000 (19:58 -0700)]
* window.h (check_all_windows): Mark externally visible.

13 years ago* window.c (window_deletion_count): Now static.
Paul Eggert [Thu, 14 Apr 2011 02:57:04 +0000 (19:57 -0700)]
* window.c (window_deletion_count): Now static.

* undo.c: Make symbols static if they're not exported.
(last_undo_buffer, last_boundary_position, pending_boundary):
Now static.

13 years ago* textprop.c (interval_insert_behind_hooks): Now static.
Paul Eggert [Thu, 14 Apr 2011 02:53:50 +0000 (19:53 -0700)]
* textprop.c (interval_insert_behind_hooks): Now static.

(interval_insert_in_front_hooks): Likewise.

13 years ago* term.c: Make symbols static if they're not exported.
Paul Eggert [Thu, 14 Apr 2011 02:52:33 +0000 (19:52 -0700)]
* term.c: Make symbols static if they're not exported.

(tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
(max_frame_lines, tty_set_terminal_modes):
(tty_reset_terminal_modes, tty_turn_off_highlight):
(get_tty_terminal): Now static.
(term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
* termhooks.h (term_mouse_moveto): Do not declare if
HAVE_WINDOW_SYSTEMM.
* dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
(tty_turn_off_highlight, get_tty_terminal): Remove decls.

13 years ago* sysdep.c: Make symbols static if they're not exported.
Paul Eggert [Thu, 14 Apr 2011 02:38:06 +0000 (19:38 -0700)]
* sysdep.c: Make symbols static if they're not exported.

(emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
Now static.
(sigprocmask_set, full_mask): Remove; unused.
(wait_debugging): Mark as visible.
* syssignal.h (SIGFULLMASK, full_mask): Remove decls.
* systty.h (emacs_get_tty, emacs_set_tty): Remove decls.

13 years ago* syntax.c (syntax_temp): Define only if !__GNUC__.
Paul Eggert [Thu, 14 Apr 2011 02:27:17 +0000 (19:27 -0700)]
* syntax.c (syntax_temp): Define only if !__GNUC__.

13 years ago* sound.c (current_sound_device, current_sound): Now static.
Paul Eggert [Thu, 14 Apr 2011 02:23:09 +0000 (19:23 -0700)]
* sound.c (current_sound_device, current_sound): Now static.

13 years ago* search.c (searchbufs, searchbuf_head): Now static.
Paul Eggert [Thu, 14 Apr 2011 02:21:33 +0000 (19:21 -0700)]
* search.c (searchbufs, searchbuf_head): Now static.

13 years ago* scroll.c (scroll_cost): Remove; unused.
Paul Eggert [Thu, 14 Apr 2011 02:20:00 +0000 (19:20 -0700)]
* scroll.c (scroll_cost): Remove; unused.

* dispextern.h (scroll_cost): Remove decl.

13 years ago* region-cache.h (pp_cache): Mark as externally visible.
Paul Eggert [Thu, 14 Apr 2011 02:17:19 +0000 (19:17 -0700)]
* region-cache.h (pp_cache): Mark as externally visible.

13 years ago* process.c: Make symbols static if they're not exported.
Paul Eggert [Thu, 14 Apr 2011 02:16:00 +0000 (19:16 -0700)]
* process.c: Make symbols static if they're not exported.

(process_tick, update_tick, create_process, chan_process):
(Vprocess_alist, proc_buffered_char, datagram_access):
(fd_callback_data, send_process_frame, process_sent_to): Now static.
(deactivate_process): Mark defn as static, as well as decl.
* lisp.h (create_process): Remove decl.
* process.h (chan_process, Vprocess_alist): Remove decls.

13 years ago* print.c: Make symbols static if they're not exported.
Paul Eggert [Thu, 14 Apr 2011 02:04:54 +0000 (19:04 -0700)]
* print.c: Make symbols static if they're not exported.

(print_depth, new_backquote_output, being_printed, print_buffer):
(print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
(print_interval, print_number_index, initial_stderr_stream):
Now static.
* lisp.h (Fprinc): Remove decl.
(debug_output_compilation_hack): Mark as externally visible.

13 years ago* sysdep.c (croak): Move decl from here to syssignal.h.
Paul Eggert [Thu, 14 Apr 2011 01:57:17 +0000 (18:57 -0700)]
* sysdep.c (croak): Move decl from here to syssignal.h.

* syssignal.h (croak): Put it here, so the API can be checked when
'croak' is called from dissociate_if_controlling_tty.

13 years ago* minibuf.c: Make symbols static if they're not exported.
Paul Eggert [Thu, 14 Apr 2011 01:51:24 +0000 (18:51 -0700)]
* minibuf.c: Make symbols static if they're not exported.

(minibuf_save_list, choose_minibuf_frame): Now static.
* lisp.h (choose_minibuf_frame): Remove decl.

13 years ago* lisp.h (verify_bytepos, count_markers): Mark as externally visible.
Paul Eggert [Thu, 14 Apr 2011 01:45:28 +0000 (18:45 -0700)]
* lisp.h (verify_bytepos, count_markers): Mark as externally visible.

13 years ago* lread.c: Make symbols static if they're not exported.
Paul Eggert [Thu, 14 Apr 2011 01:41:38 +0000 (18:41 -0700)]
* lread.c: Make symbols static if they're not exported.

(read_objects, initial_obarray, oblookup_last_bucket_number):
Now static.
(make_symbol): Remove; unused.
* lisp.h (initial_obarray, make_symbol): Remove decls.

13 years ago* keyboard.c: Make symbols static if they're not exported.
Paul Eggert [Thu, 14 Apr 2011 01:36:53 +0000 (18:36 -0700)]
* keyboard.c: Make symbols static if they're not exported.

(single_kboard, recent_keys_index, total_keys, recent_keys):
(this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
(this_single_command_key_start, echoing, last_auto_save):
(read_key_sequence_cmd, dribble, recursive_edit_unwind):
(command_loop, echo_now, keyboard_init_hook, help_char_p):
(quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
(Vlispy_mouse_stem, double_click_count):
Now static.
(force_auto_save_soon): Define only if SIGDANGER.
(ignore_mouse_drag_p): Now static if
!defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
(print_help): Remove; unused.
(stop_character, last_timer_event): Mark as externally visible.
* keyboard.h (ignore_mouse_drag_p): Declare only if
defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
(echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
* lisp.h (echoing): Remove decl.
(force_auto_save_soon): Declare only if SIGDANGER.
* xdisp.c (redisplay_window): Simplify code, to make it more
obvious that ignore_mouse_drag_p is not accessed if !defined
USE_GTK && !defined HAVE_NS.

13 years ago* intervals.c: Make symbols static if they're not exported.
Paul Eggert [Thu, 14 Apr 2011 00:55:09 +0000 (17:55 -0700)]
* intervals.c: Make symbols static if they're not exported.

(merge_properties_sticky, merge_interval_right, delete_interval):
Now static.
* intervals.h (merge_interval_right, delete_interval): Remove decls.

13 years ago* insdel.c (signal_before_change): Now static.
Paul Eggert [Thu, 14 Apr 2011 00:49:57 +0000 (17:49 -0700)]
* insdel.c (signal_before_change): Now static.

13 years ago* insdel.c: Make symbols static if they're not exported.
Paul Eggert [Thu, 14 Apr 2011 00:44:47 +0000 (17:44 -0700)]
* insdel.c: Make symbols static if they're not exported.

However, leave prepare_to_modify_buffer alone.  It's never
called from outside this function, but that appears to be a bug.
(combine_after_change_list, combine_after_change_buffer):
(adjust_after_replace): Now static.
(adjust_after_replace_noundo): Remove; unused.
* lisp.h (adjust_after_replace, adjust_after_replace_noundo):
Remove decls.

13 years ago* indent.c (val_compute_motion, val_vmotion): Now static.
Paul Eggert [Thu, 14 Apr 2011 00:42:10 +0000 (17:42 -0700)]
* indent.c (val_compute_motion, val_vmotion): Now static.

13 years ago* image.c: Make symbols static if they're not exported.
Paul Eggert [Wed, 13 Apr 2011 23:44:57 +0000 (16:44 -0700)]
* 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.

13 years ago* fringe.c (standard_bitmaps): Now static.
Paul Eggert [Wed, 13 Apr 2011 23:38:13 +0000 (16:38 -0700)]
* fringe.c (standard_bitmaps): Now static.

(max_used_fringe_bitmap): Now static, unless HAVE_NS.

13 years ago* frame.c: Make symbols static if they're not exported.
Paul Eggert [Wed, 13 Apr 2011 23:35:33 +0000 (16:35 -0700)]
* 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.

13 years ago* font.c, fontset.c: Make symbols static if they're not exported.
Paul Eggert [Wed, 13 Apr 2011 23:22:35 +0000 (16:22 -0700)]
* 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.

13 years ago* fns.c (weak_hash_tables): Now static.
Paul Eggert [Wed, 13 Apr 2011 23:02:03 +0000 (16:02 -0700)]
* fns.c (weak_hash_tables): Now static.

13 years ago* fileio.c: Make symbols static if they're not exported.
Paul Eggert [Wed, 13 Apr 2011 22:57:17 +0000 (15:57 -0700)]
* 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.

13 years ago* eval.c: Make symbols static if they're not exported.
Paul Eggert [Wed, 13 Apr 2011 22:53:58 +0000 (15:53 -0700)]
* 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.

13 years ago* emacs.c: Make symbols static if they're not exported.
Paul Eggert [Wed, 13 Apr 2011 22:50:03 +0000 (15:50 -0700)]
* 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.

13 years ago* editfns.c: Move a (normally-unused) function to its only use.
Paul Eggert [Wed, 13 Apr 2011 22:28:14 +0000 (15:28 -0700)]
* 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.

13 years ago* xterm.c: Make symbols static if they're not exported.
Paul Eggert [Wed, 13 Apr 2011 22:19:27 +0000 (15:19 -0700)]
* 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.

13 years ago* ftxfont.c: Make symbols static if they're not exported.
Paul Eggert [Tue, 12 Apr 2011 08:42:29 +0000 (01:42 -0700)]
* 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.

13 years ago* xfns.c: Make symbols static if they're not exported.
Paul Eggert [Tue, 12 Apr 2011 08:39:43 +0000 (01:39 -0700)]
* 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.

13 years ago* dispnew.c: Make symbols static if they're not exported.
Paul Eggert [Tue, 12 Apr 2011 06:36:55 +0000 (23:36 -0700)]
* 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.

13 years ago* xfaces.c: Make symbols static if they're not exported.
Paul Eggert [Tue, 12 Apr 2011 06:27:22 +0000 (23:27 -0700)]
* 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.

13 years ago* xdisp.c: Make symbols static if they're not exported.
Paul Eggert [Tue, 12 Apr 2011 06:01:37 +0000 (23:01 -0700)]
* 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.

13 years ago* dired.c (file_name_completion): Now static.
Paul Eggert [Tue, 12 Apr 2011 05:20:44 +0000 (22:20 -0700)]
* dired.c (file_name_completion): Now static.

* dbusbind.c (xd_in_read_queued_messages): Now static.

13 years ago* lisp.h (circular_list_error, FOREACH): Remove; unused.
Paul Eggert [Tue, 12 Apr 2011 05:17:33 +0000 (22:17 -0700)]
* lisp.h (circular_list_error, FOREACH): Remove; unused.

* data.c (circular_list_error): Remove.

13 years ago* commands.h (last_point_position, last_point_position_buffer):
Paul Eggert [Mon, 11 Apr 2011 07:02:21 +0000 (00:02 -0700)]
* commands.h (last_point_position, last_point_position_buffer):

(last_point_position_window): Remove decls.
* keyboard.c: Make these variables static.

13 years ago* coding.h (coding, code_convert_region, encode_coding_gap): Remove
Paul Eggert [Mon, 11 Apr 2011 06:58:57 +0000 (23:58 -0700)]
* 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.

13 years ago* chartab.c (chartab_chars, chartab_bits): Now static.
Paul Eggert [Mon, 11 Apr 2011 06:50:34 +0000 (23:50 -0700)]
* chartab.c (chartab_chars, chartab_bits): Now static.

13 years ago* charset.h (charset_iso_8859_1): Remove decl.
Paul Eggert [Mon, 11 Apr 2011 06:48:18 +0000 (23:48 -0700)]
* charset.h (charset_iso_8859_1): Remove decl.

* charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
Now static.

13 years ago* ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
Paul Eggert [Mon, 11 Apr 2011 06:43:21 +0000 (23:43 -0700)]
* ccl.h (check_ccl_update, Vccl_program_table): Remove decls.

* ccl.c (Vccl_program_table): Now static.
(check_ccl_update): Remove; unused.

13 years ago* category.c (SET_CATEGORY_SET, set_category_set): Move here.
Paul Eggert [Mon, 11 Apr 2011 06:28:35 +0000 (23:28 -0700)]
* category.c (SET_CATEGORY_SET, set_category_set): Move here.

* category.h: ... from here.
* category.c (check_category_table, set_category_set): Now static.

13 years ago* casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
Paul Eggert [Mon, 11 Apr 2011 06:21:47 +0000 (23:21 -0700)]
* casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.

* lisp.h: Remove these decls.

13 years ago* buffer.c (buffer_count): Remove unused var.
Paul Eggert [Mon, 11 Apr 2011 06:15:21 +0000 (23:15 -0700)]
* buffer.c (buffer_count): Remove unused var.

13 years ago* bidi.c (bidi_dump_cached_states): Mark as externally visible,
Paul Eggert [Mon, 11 Apr 2011 06:13:04 +0000 (23:13 -0700)]
* 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.

13 years ago* atimer.c (alarm_signal_handler, run_all_atimers): Now static.
Paul Eggert [Mon, 11 Apr 2011 06:04:34 +0000 (23:04 -0700)]
* atimer.c (alarm_signal_handler, run_all_atimers): Now static.

* atimer.h (run_all_atimers): Removed; not exported.

13 years agofont.c: Make copy_font_spec and merge_font_spec ordinary C functions.
Paul Eggert [Mon, 11 Apr 2011 05:58:27 +0000 (22:58 -0700)]
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.

13 years agoalloc.c: Import and export fewer symbols, and remove unused items.
Paul Eggert [Mon, 11 Apr 2011 04:39:49 +0000 (21:39 -0700)]
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.

13 years agoDeclare Lisp_Object Q* variables to be 'static' if not exproted.
Paul Eggert [Mon, 11 Apr 2011 03:39:45 +0000 (20:39 -0700)]
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.

13 years ago* lisp.h (DEFINE_FUNC): Make sname 'static'.
Paul Eggert [Mon, 11 Apr 2011 01:47:57 +0000 (18:47 -0700)]
* lisp.h (DEFINE_FUNC): Make sname 'static'.

13 years agoMake Emacs functions such as Fatom 'static' by default.
Paul Eggert [Mon, 11 Apr 2011 01:41:15 +0000 (18:41 -0700)]
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.

13 years ago* editfns.c (Fformat): Remove unreachable code.
Paul Eggert [Sun, 10 Apr 2011 18:02:59 +0000 (11:02 -0700)]
* editfns.c (Fformat): Remove unreachable code.

2011-04-10  Paul Eggert  <eggert@cs.ucla.edu>

13 years agoFix more problems found by GCC 4.6.0's static checks.
Paul Eggert [Sun, 10 Apr 2011 16:44:27 +0000 (09:44 -0700)]
Fix more problems found by GCC 4.6.0's static checks.

13 years agoKeep doprnt.c around for now, as we might revamp and reuse it.
Paul Eggert [Sun, 10 Apr 2011 16:33:22 +0000 (09:33 -0700)]
Keep doprnt.c around for now, as we might revamp and reuse it.

13 years agoMerge from gnulib.
Paul Eggert [Sun, 10 Apr 2011 16:00:46 +0000 (09:00 -0700)]
Merge from gnulib.

13 years agoMerge from mainline.
Paul Eggert [Sun, 10 Apr 2011 15:49:40 +0000 (08:49 -0700)]
Merge from mainline.

13 years agoFix typo in tabulated-list-print-entry
Leo Liu [Sun, 10 Apr 2011 14:21:26 +0000 (22:21 +0800)]
Fix typo in tabulated-list-print-entry

13 years agouse ssize_t and size_t for read- and write-like emacs_gnutls_* functions
Jim Meyering [Sun, 10 Apr 2011 14:00:13 +0000 (16:00 +0200)]
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.

13 years agoMerge from mainline.
Paul Eggert [Sun, 10 Apr 2011 03:24:44 +0000 (20:24 -0700)]
Merge from mainline.

13 years ago* xdisp.c (message_nolog): Bring this back, inside "#if 0".
Paul Eggert [Sun, 10 Apr 2011 02:27:15 +0000 (19:27 -0700)]
* xdisp.c (message_nolog): Bring this back, inside "#if 0".
See <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8435#26>.

13 years ago* xdisp.c (vmessage): Use a better test for character truncation.
Paul Eggert [Sat, 9 Apr 2011 23:11:48 +0000 (16:11 -0700)]
* xdisp.c (vmessage): Use a better test for character truncation.

13 years ago* syntax.c (skip_chars): Likewise.
Paul Eggert [Sat, 9 Apr 2011 22:51:22 +0000 (15:51 -0700)]
* syntax.c (skip_chars): Likewise.

13 years ago* editfns.c (Fformat): Likewise.
Paul Eggert [Sat, 9 Apr 2011 22:39:14 +0000 (15:39 -0700)]
* editfns.c (Fformat): Likewise.

13 years agoMention potential integer overflow problems.
Paul Eggert [Sat, 9 Apr 2011 22:34:58 +0000 (15:34 -0700)]
Mention potential integer overflow problems.

13 years ago* chartab.c: Use similar style as for other recent patches.
Paul Eggert [Sat, 9 Apr 2011 22:34:16 +0000 (15:34 -0700)]
* chartab.c: Use similar style as for other recent patches.

13 years ago* casetab.c (set_identity, shuffle): Likewise.
Paul Eggert [Sat, 9 Apr 2011 22:31:34 +0000 (15:31 -0700)]
* casetab.c (set_identity, shuffle): Likewise.

13 years ago* chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
Paul Eggert [Sat, 9 Apr 2011 22:21:42 +0000 (15:21 -0700)]
* chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.

13 years ago* charset.c (load_charset_map): <, not <=, for optimization.
Paul Eggert [Sat, 9 Apr 2011 20:46:34 +0000 (13:46 -0700)]
* charset.c (load_charset_map): <, not <=, for optimization.

13 years ago* xmenu.c (set_frame_menubar): Allocate smaller local vectors.
Paul Eggert [Sat, 9 Apr 2011 20:39:49 +0000 (13:39 -0700)]
* xmenu.c (set_frame_menubar): Allocate smaller local vectors.

This also lets GCC 4.6.0 generate slightly better loop code.

13 years agoCleanups to the ImageMagick code and docstrings.
Chong Yidong [Sat, 9 Apr 2011 20:28:01 +0000 (16:28 -0400)]
Cleanups to the ImageMagick code and docstrings.

* lisp/image-mode.el (image-toggle-display-image): Signal an error if
not in Image mode.
(image-transform-mode, image-transform-resize)
(image-transform-set-rotation): Doc fix.
(image-transform-set-resize): Deleted.
(image-transform-set-scale, image-transform-fit-to-height)
(image-transform-fit-to-width): Handle image-toggle-display-image
and image-transform-resize directly.

* src/image.c (Fimagemagick_types): Doc fix, and comment cleanup.

13 years ago* callint.c (Fcall_interactively): <, not <=, for optimization.
Paul Eggert [Sat, 9 Apr 2011 20:19:05 +0000 (13:19 -0700)]
* callint.c (Fcall_interactively): <, not <=, for optimization.

(Fcall_interactively): Count the number of arguments produced,
not the number of arguments given.  This is simpler and lets GCC
4.6.0 generate slightly better code.

13 years ago* ftfont.c: Distingish more carefully between FcChar8 and char.
Paul Eggert [Sat, 9 Apr 2011 19:14:12 +0000 (12:14 -0700)]
* ftfont.c: Distingish more carefully between FcChar8 and char.

The previous code passed unsigned char * to a functions like
strlen and xstrcasecmp that expect char *, which does not
conform to the C standard.
(get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
arguments to FcPatternGetString, and explicitly cast FcChar8 * to
char * when the C standard requires it.

13 years ago* keyboard.c (read_char): Remove unused var.
Paul Eggert [Sat, 9 Apr 2011 19:12:39 +0000 (12:12 -0700)]
* keyboard.c (read_char): Remove unused var.

13 years agoMerge from gnulib.
Paul Eggert [Sat, 9 Apr 2011 18:44:05 +0000 (11:44 -0700)]
Merge from gnulib.

13 years agoMerge from mainline.
Paul Eggert [Sat, 9 Apr 2011 18:42:31 +0000 (11:42 -0700)]
Merge from mainline.

13 years agoMerge from emacs-23; up to 2010-06-08T03:06:47Z!dann@ics.uci.edu.
Glenn Morris [Sat, 9 Apr 2011 17:40:29 +0000 (10:40 -0700)]
Merge from emacs-23; up to 2010-06-08T03:06:47Z!dann@ics.uci.edu.

13 years agoMark tiny change.
Glenn Morris [Sat, 9 Apr 2011 17:37:33 +0000 (10:37 -0700)]
Mark tiny change.

13 years agoFix ChangeLog attribution.
Glenn Morris [Sat, 9 Apr 2011 17:31:13 +0000 (10:31 -0700)]
Fix ChangeLog attribution.

See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8450
and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=610576

13 years agoReplace some uses of `int' with EMACS_INT.
Eli Zaretskii [Sat, 9 Apr 2011 16:35:19 +0000 (19:35 +0300)]
Replace some uses of `int' with EMACS_INT.

 src/search.c (string_match_1, fast_string_match)
 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
 (scan_buffer, find_next_newline_no_quit)
 (find_before_next_newline, search_command, Freplace_match)
 (Fmatch_data): Make some `int' variables be EMACS_INT.
 src/xdisp.c (display_count_lines): 3rd argument and return value now
 EMACS_INT.  All callers changed.
 (pint2hrstr): Last argument is now EMACS_INT.
 src/coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
 (decode_coding_utf_16, decode_coding_emacs_mule)
 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
 (decode_coding_ccl, decode_coding_charset)
 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
 (decode_coding_iso_2022, decode_coding_emacs_mule)
 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
 <char_offset, last_offset>: Declare EMACS_INT.
 (encode_coding_utf_8, encode_coding_utf_16)
 (encode_coding_emacs_mule, encode_invocation_designation)
 (encode_designation_at_bol, encode_coding_iso_2022)
 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
 Declare EMACS_INT.
 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
 (encode_invocation_designation): Last argument P_NCHARS is now
 EMACS_INT.
 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
 src/coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
 All users changed.
 src/ccl.c (Fccl_execute_on_string): Declare some variables
 EMACS_INT.

13 years agoProduce more accurate results from file-size-human-readable.
Eli Zaretskii [Sat, 9 Apr 2011 06:59:26 +0000 (09:59 +0300)]
Produce more accurate results from file-size-human-readable.

 lisp/files.el (file-size-human-readable): Produce one digit after
 decimal, like "ls -lh" does.
 lisp/ls-lisp.el (ls-lisp-format-file-size): Allow for 7 characters in
 the file size representation.

13 years ago* eval.c: Port to Windows vsnprintf (Bug#8435).
Paul Eggert [Fri, 8 Apr 2011 23:28:52 +0000 (16:28 -0700)]
* eval.c: Port to Windows vsnprintf (Bug#8435).

Include <limits.h>.
(SIZE_MAX): Define if the headers do not.
(verror): Do not give up if vsnprintf returns a negative count.
Instead, grow the buffer.  This ports to Windows vsnprintf, which
does not conform to C99.  Problem reported by Eli Zaretskii.
Also, simplify the allocation scheme, by avoiding the need for
calling realloc, and removing the ALLOCATED variable.

13 years agoUpdate from gnulib.
Paul Eggert [Fri, 8 Apr 2011 21:53:30 +0000 (14:53 -0700)]
Update from gnulib.

13 years agoFix more GCC strict-aliasing warnings.
Chong Yidong [Fri, 8 Apr 2011 20:41:28 +0000 (16:41 -0400)]
Fix more GCC strict-aliasing warnings.

* src/ftfont.c (get_adstyle_property, ftfont_pattern_entity): Use
unsigned char, to match FcChar8 type definition.

* src/xmenu.c (create_and_show_popup_menu):
* src/xselect.c (x_decline_selection_request)
(x_reply_selection_request): Avoid type-punned deref of X events.

13 years agoFit contents to emacs window support for doc-view by Sho Nakatani.
Tassilo Horn [Fri, 8 Apr 2011 20:09:19 +0000 (22:09 +0200)]
Fit contents to emacs window support for doc-view by Sho Nakatani.

2011-03-28  Sho Nakatani <lay.sakura <at> gmail.com>

* doc-view.el (doc-view-fit-width-to-window)
(doc-view-fit-height-to-window, doc-view-fit-page-to-window): New
functions for fitting the shown image to the Emacs window size.
(doc-view-mode-map): Add bindings for the new functions.

13 years ago* xterm.c (handle_one_xevent): Avoid type-punned derefencing of X events.
Chong Yidong [Fri, 8 Apr 2011 19:18:25 +0000 (15:18 -0400)]
* xterm.c (handle_one_xevent): Avoid type-punned derefencing of X events.

13 years agoMerge changes from emacs-23 branch
Chong Yidong [Fri, 8 Apr 2011 18:53:26 +0000 (14:53 -0400)]
Merge changes from emacs-23 branch

13 years ago* term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
Svante Signell [Fri, 8 Apr 2011 18:44:36 +0000 (14:44 -0400)]
* term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).

13 years agoBail out from list-processes if async subprocesses aren't available.
Eli Zaretskii [Fri, 8 Apr 2011 17:08:17 +0000 (20:08 +0300)]
Bail out from list-processes if async subprocesses aren't available.

 lisp/simple.el (list-processes): If async subprocesses are not
 available, error out with a clear error message.

13 years ago* src/xml.c (parse_region): Avoid creating spurious whiespace nodes.
T.V. Raman [Fri, 8 Apr 2011 16:15:30 +0000 (12:15 -0400)]
* src/xml.c (parse_region): Avoid creating spurious whiespace nodes.

See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00200.html

13 years ago* keyboard.c (syms_of_keyboard): Use DEFSYM macro.
Chong Yidong [Fri, 8 Apr 2011 15:51:28 +0000 (11:51 -0400)]
* keyboard.c (syms_of_keyboard): Use DEFSYM macro.

13 years agoRemove internal_with_output_to_temp_buffer, replacing sole user with Lisp.
Chong Yidong [Fri, 8 Apr 2011 15:37:15 +0000 (11:37 -0400)]
Remove internal_with_output_to_temp_buffer, replacing sole user with Lisp.

* lisp/help.el (help-form-show): New function, to be called from C.
Put help-form output in a buffer named differently than *Help*.

* src/keyboard.c (read_char): Call Lisp function help-form-show,
instead of using internal_with_output_to_temp_buffer.
(Qhelp_form_show): New var.

* src/lisp.h (internal_with_output_to_temp_buffer): Remove prototype.

* src/print.c (internal_with_output_to_temp_buffer): Function deleted.

13 years agoNew function file-size-human-readable.
Eli Zaretskii [Fri, 8 Apr 2011 15:31:33 +0000 (18:31 +0300)]
New function file-size-human-readable.

 lisp/files.el (file-size-human-readable): New function.
 lisp/ls-lisp.el (ls-lisp-format-file-size): Use it, instead of
 computing the representation inline.  Don't require `cl'.

13 years ago* lisp/man.el (Man-page-header-regexp): Solaris < 2.6 no longer supported.
Glenn Morris [Fri, 8 Apr 2011 03:30:26 +0000 (20:30 -0700)]
* lisp/man.el (Man-page-header-regexp): Solaris < 2.6 no longer supported.