X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/9f3842cef7423e3ce6f75721284e6351f3a200e5..a5a62657a2875e5f89e4aefd93df4023277426f6:/src/ChangeLog diff --git a/src/ChangeLog b/src/ChangeLog index cb9096a5a5..9c1b17f899 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,32 +1,249 @@ -2011-03-28 Eli Zaretskii +2011-04-01 Paul Eggert - * xdisp.c (try_scrolling): When point is above the window, allow - searching as far as scroll_max, or one screenful, to compute - vertical distance from PT to the scroll margin position. This - prevents try_scrolling from unnecessarily failing when + * xfaces.c (realize_named_face): Remove vars that are set but not used. + (map_tty_color) [!defined MSDOS]: Likewise. + + * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning. + + * coding.c: Remove vars that are set but not used. + (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused. + All callers changed. + (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule): + (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5): + (decode_coding_charset): Remove vars that are set but not used. + + * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var + that is set but not used. + + * print.c (print_object): Remove var that is set but not used. + + Replace 2 copies of readlink code with 1 gnulib version (Bug#8401). + The gnulib version avoids calling malloc in the usual case, + and on 64-bit hosts doesn't have some arbitrary 32-bit limits. + * fileio.c (Ffile_symlink_p): Use emacs_readlink. + * filelock.c (current_lock_owner): Likewise. + * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function. + * sysdep.c: Include allocator.h, careadlinkat.h. + (emacs_no_realloc_allocator): New static constant. + (emacs_readlink): New function. + * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on + ../lib/careadlinkat.h. + +2011-03-31 Juanma Barranquero + + * xdisp.c (redisplay_internal): Fix prototype. + +2011-03-31 Eli Zaretskii + + * xdisp.c (SCROLL_LIMIT): New macro. + (try_scrolling): Use it when setting scroll_limit. Limit + scrolling to 100 screen lines. + (redisplay_window): Even when falling back on "recentering", + position point in the window according to scroll-conservatively, + scroll-margin, and scroll-*-aggressively variables. (Bug#6671) + + (try_scrolling): When point is above the window, allow searching + as far as scroll_max, or one screenful, to compute vertical + distance from PT to the scroll margin position. This prevents + try_scrolling from unnecessarily failing when scroll-conservatively is set to a value slightly larger than the - window height. + window height. Clean up the case of PT below the margin at bottom + of window: scroll_max can no longer be INT_MAX. When aggressive + scrolling is in use, don't let point enter the opposite scroll + margin as result of the scroll. + (syms_of_xdisp) : Document the + threshold of 100 lines for never-recentering scrolling. + +2011-03-31 Juanma Barranquero + + * dispextern.h (move_it_by_lines): + * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused + since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed. + (message_log_check_duplicate): Remove parameters `prev_bol' and + `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed. + (redisplay_internal): Remove parameter `preserve_echo_area', + unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed. + + * indent.c (Fvertical_motion): + * window.c (window_scroll_pixel_based, Frecenter): + Don't pass `need_y_p' to `move_it_by_lines'. + +2011-03-30 Stefan Monnier + + * eval.c (struct backtrace): Don't cheat with negative numbers, but do + steal a few bits to be more compact. + (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace): + Remove unneeded casts. + + * bytecode.c (Fbyte_code): CAR and CDR can GC. + +2011-03-30 Zachary Kanfer (tiny change) + + * keyboard.c (Fexecute_extended_command): Do log the "suggest key + binding" message (bug#7967). + +2011-03-30 Paul Eggert + + Fix more problems found by GCC 4.6.0's static checks. + + * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]: + Remove unused local var. + + * editfns.c (Fmessage_box): Remove unused local var. + + * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs): + (note_mode_line_or_margin_highlight, note_mouse_highlight): + Omit unused local vars. + * window.c (shrink_windows): Omit unused local var. + * menu.c (digest_single_submenu): Omit unused local var. + * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]: + Omit unused local var. + + * keyboard.c (parse_modifiers_uncached, parse_modifiers): + Don't assume string length fits in int. + (keyremap_step, read_key_sequence): Use size_t for sizes. + (read_key_sequence): Don't check last_real_key_start redundantly. + + * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA + instead of alloca (Bug#8344). + + * eval.c (Fbacktrace): Don't assume nargs fits in int. + (Fbacktrace_frame): Don't assume nframes fits in int. + + * syntax.c (scan_sexps_forward): Avoid pointer wraparound. + + * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow + concerns. + + * term.c (produce_glyphless_glyph): Remove unnecessary test. + + * cm.c (calccost): Turn while-do into do-while, for clarity. + + * keyboard.c (syms_of_keyboard): Use the same style as later + in this function when indexing through an array. This also + works around GCC bug 48267. + + * image.c (tiff_load): Fix off-by-one image count (Bug#8336). + + * xselect.c (x_check_property_data): Return correct size (Bug#8335). + + * chartab.c (sub_char_table_ref_and_range): Redo for slight + efficiency gain, and to bypass a gcc -Wstrict-overflow warning. + + * keyboard.c, keyboard.h (num_input_events): Now size_t. + This avoids undefined behavior on integer overflow, and is a bit + more convenient anyway since it is compared to a size_t variable. -2011-03-27 Eli Zaretskii + Variadic C functions now count arguments with size_t, not int. + This avoids an unnecessary limitation on 64-bit machines, which + caused (substring ...) to crash on large vectors (Bug#8344). + * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int. + (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise. + All variadic functions and their callers changed accordingly. + (struct gcpro.nvars): Now size_t, not int. All uses changed. + * data.c (arith_driver, float_arith_driver): Likewise. + * editfns.c (general_insert_function): Likewise. + * eval.c (struct backtrace.nargs, interactive_p) + (internal_condition_case_n, run_hook_with_args, apply_lambda) + (funcall_lambda, mark_backtrace): Likewise. + * fns.c (concat): Likewise. + * frame.c (x_set_frame_parameters): Likewise. + * fns.c (get_key_arg): Now accepts and returns size_t, and returns + 0 if not found, not -1. All callers changed. - * xdisp.c (try_scrolling): Clean up the case of PT below the - margin at bottom of window: scroll_max can no longer be INT_MAX. - (redisplay_window): Find character position of margin and use - that, rather than adding margin to PT. + * alloc.c (garbage_collect): Don't assume stack size fits in int. + (stack_copy_size): Now size_t, not int. + (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0. + +2011-03-28 Juanma Barranquero + + * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end', + unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org. + All callers changed. + + * lisp.h (multibyte_char_to_unibyte): + * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl', + unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org. + * character.h (CHAR_TO_BYTE8): + * cmds.c (internal_self_insert): + * editfns.c (general_insert_function): + * keymap.c (push_key_description): + * search.c (Freplace_match): + * xdisp.c (message_dolog, set_message_1): All callers changed. + +2011-03-28 Stefan Monnier + + * keyboard.c (safe_run_hook_funcall): New function. + (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error, + don't set the hook to nil, but remove the offending function instead. + (Qcommand_hook_internal): Remove, unused. + (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define + Vcommand_hook_internal. + + * eval.c (enum run_hooks_condition): Remove. + (funcall_nil, funcall_not): New functions. + (run_hook_with_args): Call each function through a `funcall' argument. + Remove `cond' argument, now redundant. + (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success) + (Frun_hook_with_args_until_failure): Adjust accordingly. + (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions. + +2011-03-28 Juanma Barranquero + + * dispextern.h (string_buffer_position): Remove declaration. + + * print.c (strout): Remove parameter `multibyte', unused since + 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed. + + * search.c (boyer_moore): Remove parameters `len', `pos' and `lim', + never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org. + All callers changed. + + * w32.c (_wsa_errlist): Use braces for struct initializers. + + * xdisp.c (string_buffer_position_lim): Remove parameter `w', + never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org. + All callers changed. + (string_buffer_position): Likewise. Also, make static (it's never + used outside xdisp.c). + (cursor_row_p): Remove parameter `w', unused since + 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed. + (decode_mode_spec): Remove parameter `precision', introduced during + Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used. + All callers changed. + +2011-03-27 Jan Djärv + + * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar. + +2011-03-27 Anders Lindgren + + * nsterm.m (ns_menu_bar_is_hidden): New variable. + (ns_constrain_all_frames, ns_menu_bar_should_be_hidden) + (ns_update_auto_hide_menu_bar): New functions. + (ns_update_begin): Call ns_update_auto_hide_menu_bar. + (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and + ns_constrain_all_frames. + (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden. + (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil. + +2011-03-27 Jan Djärv + + * nsmenu.m (runDialogAt): Remove argument to timer_check. + +2011-03-27 Glenn Morris + + * syssignal.h: Replace RETSIGTYPE with void. + * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c: + * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c: + Replace SIGTYPE with void everywhere. + * s/usg5-4-common.h (SIGTYPE): Remove definition. + * s/template.h (SIGTYPE): Remove commented out definition. 2011-03-26 Eli Zaretskii * xdisp.c (redisplay_window): Don't check buffer's clip_changed flag as a prerequisite for invoking try_scrolling. (Bug#6671) - (try_scrolling): Limit scrolling to 100 screen lines. - (SCROLL_LIMIT): New macro. - (try_scrolling): Use it when setting scroll_limit. - (redisplay_window): Even when falling back on "recentering", - position point in the window according to scroll-conservatively, - scroll-margin, and scroll-*-aggressively variables. (Bug#6671) - (try_scrolling): When aggressive scrolling is in use, don't let - point enter the opposite scroll margin as result of the scroll. - (redisplay_window): Fix operator precedence in condition. 2011-03-26 Juanma Barranquero @@ -202,8 +419,8 @@ (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298). Make tparam.h and terminfo.c consistent. - * cm.c (tputs, tgoto, BC, UP): Remove extern decls. Include - tparam.h instead, since it declares them. + * cm.c (tputs, tgoto, BC, UP): Remove extern decls. + Include tparam.h instead, since it declares them. * cm.h (PC): Remove extern decl; tparam.h now does this. * deps.mk (cm.o, terminfo.o): Depend on tparam.h. * terminfo.c: Include tparam.h, to check interfaces. @@ -249,8 +466,8 @@ * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else". - * atimer.c (start_atimer, append_atimer_lists, set_alarm): Rename - locals to avoid shadowing. + * atimer.c (start_atimer, append_atimer_lists, set_alarm): + Rename locals to avoid shadowing. * sound.c (wav_play, au_play, Fplay_sound_internal): Fix pointer signedness. @@ -419,8 +636,8 @@ gcc -Wbad-function-cast warning. (default_value, arithcompare, arith_driver, arith_error): Now static. (store_symval_forwarding): Rename local to avoid shadowing. - (Fmake_variable_buffer_local, Fmake_local_variable): Mark - variables as initialized. + (Fmake_variable_buffer_local, Fmake_local_variable): + Mark variables as initialized. (do_blv_forwarding, do_symval_forwarding): Remove; unused. * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST. @@ -674,8 +891,8 @@ (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219). These macros can no longer be used for assignment. - * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Assign - struct members directly, instead of using BUF_BEGV etc. + * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): + Assign struct members directly, instead of using BUF_BEGV etc. (record_buffer_markers, fetch_buffer_markers): New functions for recording and fetching special buffer markers. (set_buffer_internal_1, set_buffer_temp): Use them. @@ -796,8 +1013,8 @@ * term.c (encode_terminal_code): Now external again, used by w32console.c and msdos.c. - * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)): Depend - on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu. + * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)): + Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu. 2011-03-11 Paul Eggert @@ -861,8 +1078,8 @@ (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN. (x_connection_closed): Tell GCC not to suggest NO_RETURN. - * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename - or move locals to avoid shadowing. + * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): + Rename or move locals to avoid shadowing. (tty_defined_color, merge_face_heights): Now static. (free_realized_faces_for_fontset): Remove; not used. (Fx_list_fonts): Mark variable that gcc -Wuninitialized @@ -1020,12 +1237,12 @@ (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen. (xg_prepare_tooltip, create_dialog, menubar_map_cb) (xg_update_frame_menubar, xg_tool_bar_detach_callback) - (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes): Call - gtk_widget_get_preferred_size. + (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes): + Call gtk_widget_get_preferred_size. (xg_frame_resized): gdk_window_get_geometry only takes 5 parameters. - (xg_win_to_widget, xg_event_is_for_menubar): Call - gdk_x11_window_lookup_for_display. + (xg_win_to_widget, xg_event_is_for_menubar): + Call gdk_x11_window_lookup_for_display. (xg_set_widget_bg): New function. (delete_cb): New function. (xg_create_frame_widgets): connect delete-event to delete_cb. @@ -1121,7 +1338,7 @@ (produce_glyphless_glyph): Make a pointer "const" since it might point to immutable storage. (update_window_cursor): Now static, since it's not used elsewhere. - (SKIP_GLYPHS): Removed unused macro. + (SKIP_GLYPHS): Remove unused macro. 2011-03-06 Michael Shields (tiny change) @@ -7618,7 +7835,7 @@ * xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT) (handle_one_xevent, x_check_errors, xim_initialize, x_term_init): Likewise. - * character.h (BCOPY_SHORT): Removed. + * character.h (BCOPY_SHORT): Remove. * config.in: Regenerate. * dispnew.c (safe_bcopy): Only define as dummy if PROFILING. * emacs.c (main) [PROFILING]: Don't declare @@ -19407,7 +19624,7 @@ Set xftfont_info->ft_size. Don't unlock the face. Check BDF properties if appropriate. (xftfont_close): Unlock the face. - (xftfont_anchor_point, xftfont_shape): Deleted. + (xftfont_anchor_point, xftfont_shape): Delete. (syms_of_xftfont): Don't set members anchor_point and shape of xftfont_driver. @@ -21312,7 +21529,7 @@ Delete externs. (fontset_from_font_name): Extern it. (FS_LOAD_FONT, FONT_INFO_ID, FONT_INFO_FROM_ID) - (FONT_INFO_FROM_FACE): Deleted. + (FONT_INFO_FROM_FACE): Delete. (face_for_font): Adjust prototype. * fontset.c: Throughout the file, delete all USE_FONT_BACKEND @@ -21329,7 +21546,7 @@ (fontset_compare_rfontdef): New function. (reorder_font_vector): Remove the argument CHARSET-ID. Sort rfont-defs by qsort. Adjusted for the change of font-group vector. - (load_font_get_repertory): Deleted. + (load_font_get_repertory): Delete. (fontset_find_font): Use new macros to ref/set elements of font-def and rfont-def. (fontset_font): Fix the timing of remembering that no font for C. @@ -21345,11 +21562,11 @@ font-def. (Fnew_fontset): Use font_unparse_xlfd to generate FONTSET_ASCII (fontset). - (new_fontset_from_font_name): Deleted. + (new_fontset_from_font_name): Delete. (fontset_from_font): Rename from new_fontset_from_font. Check if a fontset is already created for the font. FIx updating of Vfontset_alias_alist. - (fontset_ascii_font): Deleted. + (fontset_ascii_font): Delete. (Ffont_info): Adjust for the format change of font-spec. (Finternal_char_font): Likewise. (Ffontset_info): Likewise. @@ -21377,7 +21594,7 @@ (ftfont_list): Return a list, not vector. (ftfont_match): Use ftfont_spec_pattern to get a pattern. (ftfont_list_family): Don't downcase names. - (ftfont_free_entity): Deleted. + (ftfont_free_entity): Delete. (ftfont_open): Return a font-object. Adjusted for the change of struct font. Get underline_thickness and underline_position from font property. Don't update dpyinfo->smallest_font_height and @@ -21429,13 +21646,13 @@ (QCfoundry, QCadstyle, QCregistry, QCspacing, QCsize, QCavgwidth) (Qp): Extern them. (clear_font_table, load_face_font, xlfd_lookup_field_contents): - Deleted. - (struct font_name): Deleted. - (xlfd_numeric_value, xlfd_symbolic_value): Deleted. + Delete. + (struct font_name): Delete. + (xlfd_numeric_value, xlfd_symbolic_value): Delete. (compare_fonts_by_sort_order): New function. (xlfd_numeric_slant, xlfd_symbolic_slant, xlfd_numeric_weight) (xlfd_symbolic_weight, xlfd_numeric_swidth, xlfd_symbolic_swidth): - Deleted. + Delete. (Fx_family_fonts): Use font_list_entities, and sort fonts by compare_fonts_by_sort_order. (Fx_font_family_list): Call Ffont_family_list. @@ -21448,9 +21665,9 @@ (free_font_names, sort_fonts, x_face_list_fonts) (face_font_available_p, sorted_font_list, cmp_font_names) (font_list_1, concat_font_list, font_list, remove_duplicates): - Deleted. + Delete. (Fx_list_fonts): Use Ffont_list. - (LFACE_AVGWIDTH): Deleted. + (LFACE_AVGWIDTH): Delete. (check_lface_attrs): Don't check LFACE_AVGWIDTH. Check LFACE_FONT by FONTP. (lface_fully_specified_p): Don't check LFACE_AVGWIDTH. @@ -21472,7 +21689,7 @@ (Fface_font): Get a font name from font->props[FONT_NAME_INDEX]. (lface_same_font_attributes_p): Don't check LFACE_AVGWIDTH. Compare fonts by EQ. - (lookup_non_ascii_face): Deleted. + (lookup_non_ascii_face): Delete. (face_for_font): The 2nd argument changed. (x_supports_face_attributes_p): Don't check LFACE_AVGWIDTH. Check atomic font properties by case insensitive. @@ -21495,7 +21712,7 @@ * xfont.c: Include and "ccl.h". (struct xfont_info): New structure. - (xfont_query_font): Deleted. + (xfont_query_font): Delete. (xfont_find_ccl_program): Rename from x_find_ccl_program and moved from xterm.c. (xfont_driver): Adjust for the change of struct font_driver. @@ -21511,7 +21728,7 @@ dpyinfo->smallest_char_width. (xfont_close): Don't free struct font. (xfont_prepare_face): Adjust for the change of struct font. - (xfont_done_face): Deleted. + (xfont_done_face): Delete. (xfont_has_char): Adjust for the change of struct font. (xfont_encode_char, xfont_draw): Likewise. (xfont_check): New function. @@ -21541,7 +21758,7 @@ * xterm.c: Throughout the file, delete all USE_FONT_BACKEND conditionals. Don't check enable_font_backend. Delete all codes used only when USE_FONT_BACKEND is not defined. Don't include ccl.h. - (x_per_char_metric, x_encode_char): Deleted. + (x_per_char_metric, x_encode_char): Delete. (x_set_cursor_gc, x_set_mouse_face_gc): Don't set GCFont. (x_compute_glyph_string_overhangs): Adjust for the change of `struct face'. @@ -21550,10 +21767,10 @@ (x_draw_glyph_string): Likewise. Use font->underline_position and font->underline_thickness. (x_new_font): Rename from x_new_fontset2. - (x_new_fontset, x_get_font_info, x_list_fonts): Deleted. + (x_new_fontset, x_get_font_info, x_list_fonts): Delete. (x_check_font): Call `check' method of a font driver. (x_font_min_bounds, x_compute_min_glyph_bounds, x_load_font) - (x_query_font, x_get_font_repertory): Deleted. + (x_query_font, x_get_font_repertory): Delete. (x_find_ccl_program): Rename and moved to xfont.c. (x_redisplay_interface): Adjust for the change of `struct redisplay_interface'.