X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/4b1b4443359243562362bd0f07518494339f69ed..b221615bc47647612a1a0999b5c9b7cfc699fce6:/src/ChangeLog diff --git a/src/ChangeLog b/src/ChangeLog index e672beaacb..dd9d9cecb2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,9 +1,1412 @@ +2003-07-09 Stefan Monnier + + Change overlays_after and overlays_before so the overlays themselves + are linked into lists, rather than using cons cells. After all each + Lisp_Misc already occupies 5 words, so we can add a `next' field to + Lisp_Overlay for free and save up one cons cell per overlay (not + to mention one indirection when traversing the list of overlay). + + * lisp.h (struct Lisp_Overlay): New field `next'. + + * buffer.h (struct buffer): Change overlays_before and overlays_after + from Lisp lists of overlays to pointers to overlays. + + * buffer.c (overlay_strings, recenter_overlay_lists): + Fix typo in eassert in last commit. + (unchain_overlay): New function. + (add_overlay_mod_hooklist): Use AREF. + (copy_overlays, reset_buffer, overlays_at, overlays_in) + (overlay_touches_p, overlay_strings, recenter_overlay_lists) + (fix_overlays_in_range, fix_overlays_before, Fmake_overlay) + (Fmove_overlay, Fdelete_overlay, Foverlay_lists) + (report_overlay_modification, evaporate_overlays, init_buffer_once): + Adjust to new type of overlays_(before|after). + + * alloc.c (mark_object): Mark the new `next' field of overlays. + (mark_buffer): Manually mark the overlays_(after|before) fields. + + * coding.c (run_pre_post_conversion_on_str): + * editfns.c (overlays_around): + * xdisp.c (load_overlay_strings): + * fileio.c (Finsert_file_contents): + * indent.c (current_column): + * insdel.c (signal_before_change, signal_after_change): + * intervals.c (set_point_both): + * print.c (temp_output_buffer_setup): Use new type for + overlays_(before|after). + +2003-07-08 Stefan Monnier + + * buffer.c (report_overlay_modification): Don't run hooks while + traversing the list of overlays. + + * buffer.h (struct buffer): Use an int for overlay_center. + (overlays_at, evaporate_overlays, recenter_overlay_lists) + (overlay_strings, fix_overlays_before): Use EMACS_INT for positions. + + * buffer.c (reset_buffer, recenter_overlay_lists) + (adjust_overlays_for_insert, adjust_overlays_for_delete) + (fix_overlays_in_range, Fmake_overlay, Fmove_overlay) + (evaporate_overlays, init_buffer_once): Update use of overlay_center. + (overlays_at, evaporate_overlays, recenter_overlay_lists) + (overlay_strings, fix_overlays_before): Use EMACS_INT for positions. + + * xdisp.c (fast_find_position): Remove unused var. + + * cmds.c (Qexpand_abbrev): New sym. + (syms_of_cmds): Initialize it. + (internal_self_insert): Use it to call expand-abbrev. + +2003-07-09 Kim F. Storm + + * xterm.c (use_xim) [!USE_XIM]: Default to disable XIM if emacs + was configured with --without-xim. + (x_term_init) [!USE_XIM]: Use `useXIM' resource to turn on XIM. + +2003-07-07 Richard M. Stallman + + * xdisp.c (reseat_1): Set it->area to TEXT_AREA. + + * alloc.c (Fgarbage_collect): Doc fix. + +2003-07-07 Nozomu Ando (tiny change) + + * buffer.c (Fkill_buffer): Clear charpos cache if necessary. + +2003-07-06 Stefan Monnier + + * minibuf.c (read_minibuf): UNGCPRO before returning. + (Ftry_completion, Fall_completions): Doc fix. + + * alloc.c (live_float_p): Check that p is not past the `floats' array, + now that `floats' is not the last element of the struct any more. + +2003-07-06 Jason Rumney + + * w32term.h (ClipboardSequence_Proc): New type. + + * w32fns.c (clipboard_sequence_fn): New variable. + (globals_of_w32fns): Initialize it. + + * w32select.c (last_clipboard_sequence_number): New variable. + (Fw32_set_clipboard_data, Fw32_get_clipboard_data): Use sequence + number if possible. + +2003-07-06 Stefan Monnier + + * m/amdx86-64.h (MARKBIT): + * m/ia64.h (MARKBIT): Remove definition since lisp.h does not compare + MARKBIT and ARRAY_MARK_FLAG any more. + + * m/hp800.h (XSETMARKBIT): + * m/sr2k.h (XSETMARKBIT): + * lisp.h (XSETMARKBIT): Remove unused macro. + + * lisp.h (mark_object): Change prototype. + + * alloc.c (mark_object): Change arg *Lisp_Object -> Lisp_Object. + (last_marked): Change accordingly. + (mark_interval, mark_maybe_object, mark_maybe_pointer) + (Fgarbage_collect, mark_glyph_matrix, mark_face_cache, mark_image) + (mark_buffer): Update calls to mark_object. + + * bytecode.c (mark_byte_stack): + * fns.c (sweep_weak_table): + * keyboard.c (mark_kboards): Update calls to mark_object. + +2003-07-06 Jason Rumney + + * alloc.c (struct ablock): Only include padding when there is some. + +2003-07-04 Stefan Monnier + + * alloc.c (ALIGN): Add casts to simplify usage. + (BLOCK_ALIGN, BLOCK_BYTES, ABLOCKS_PADDING, ABLOCKS_SIZE) + (ABLOCKS_BYTES, ABLOCK_ABASE, ABLOCKS_BUSY, ABLOCKS_BASE): New macros. + (struct ablock, struct ablocks): New types. + (free_ablock): New global var. + (lisp_align_malloc, lisp_align_free): New functions. + (FLOAT_BLOCK_SIZE): Redefine in terms of BLOCK_BYTES. + (struct float_block): Reorder and add gcmarkbits. + (GETMARKBIT, SETMARKBIT, UNSETMARKBIT, FLOAT_BLOCK, FLOAT_INDEX) + (FLOAT_MARKED_P, FLOAT_MARK, FLOAT_UNMARK): New macros. + (init_float, make_float): Use lisp_align_malloc. + (free_float, live_float_p): Don't use `type' any more. + (make_float): Use FLOAT_UNMARK to access to mark bit. + (mark_maybe_object, mark_maybe_pointer, survives_gc_p): + Use FLOAT_MARKED_P to access the mark bit. + (pure_alloc): Simplify use of ALIGN. + (mark_object): Use FLOAT_MARK to access the mark bit. + (gc_sweep): Use new macros to access the float's mark bit. + (init_alloc_once): Init free_ablock. + + * lisp.h (struct Lisp_Float): Remove unused field `type'. + +2003-06-27 Stefan Monnier + + * alloc.c (VECTOR_MARK, VECTOR_UNMARK, VECTOR_MARKED_P): New macros. + (GC_STRING_BYTES): Don't mask markbit (it's only used on `size'). + (allocate_buffer): Move. + (string_bytes): Don't mask markbit of `size_byte'. + (mark_maybe_object, mark_maybe_pointer, Fgarbage_collect) + (mark_object, mark_buffer, survives_gc_p, gc_sweep): + Use the `size' field of buffers (rather than the `name' field) for + the mark bit, as is done for all other vectorlike objects. + Use the new macros to access the mark bit of vectorlike objects. + +2003-06-26 Richard M. Stallman + + * puresize.h (BASE_PURESIZE): Increment base size. + + * xdisp.c (fast_find_position): Enable Gerd's new definition. + + * xterm.c (xim_initialize): Undo previous change. + +2003-06-26 Stefan Monnier + + * alloc.c (survives_gc_p): Simplify. + + * buffer.c (set_buffer_internal_1): Test CONSP for lists. + + * window.c (Fset_window_dedicated_p): Simplify. + (display_buffer_1): Don't raise the win from which minibuf was entered. + (temp_output_buffer_show): Don't assume BEG == 1. Simplify. + (Fminibuffer_selected_window): Simplify. + + * buffer.h (struct buffer_text): Lisp_Object `markers' => Lisp_Marker. + + * lisp.h (unchain_marker): Lisp_Object arg => Lisp_Marker. + (struct Lisp_Marker): Lisp_Object `chain' => Lisp_Marker `next'. + + * insdel.c (check_markers, adjust_markers_for_delete) + (adjust_markers_for_insert, adjust_markers_for_replace) + (prepare_to_modify_buffer, RESTORE_VALUE): + * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos) + (Fset_marker, set_marker_restricted, set_marker_both, unchain_marker) + (set_marker_restricted_both, Fbuffer_has_markers_at, count_markers): + * alloc.c (Fmake_marker, free_marker, gc_sweep): + * buffer.c (Fget_buffer_create, Fkill_buffer, Fset_buffer_multibyte): + * editfns.c (save_excursion_restore, transpose_markers): + * window.c (delete_window): + * xdisp.c (message_dolog): Update for new types. + +2003-06-26 Jan Dj,Ad(Brv + + * xfaces.c (set_font_frame_param): Set default_face_done_p to zero. + (realize_default_face): Use default_face_done_p for the force_p + argument to set_lface_from_font_name. Set default_face_done_p to one. + + * frame.c (make_frame): Initialize default_face_done_p. + + * frame.h (struct frame): Add default_face_done_p. + + * config.in: Add XRegisterIMInstantiateCallback_arg6 so it + will be defined. + +2003-06-25 Stefan Monnier + + * alloc.c (make_interval, Fmake_symbol, allocate_misc): + Initialize the new field `gcmarkbit'. + (mark_interval, MARK_INTERVAL_TREE): Use the new `gcmarkbit' field. + (mark_interval_tree): Don't mark the tree separately from the nodes. + (UNMARK_BALANCE_INTERVALS): Don't unmark the tree. + (mark_maybe_object, mark_maybe_pointer, Fgarbage_collect) + (mark_object, survives_gc_p, gc_sweep): Use new `gcmarkbit' fields. + + * lisp.h (struct interval, struct Lisp_Symbol, struct Lisp_Free) + (struct Lisp_Marker, struct Lisp_Intfwd, struct Lisp_Boolfwd) + (struct Lisp_Kboard_Objfwd, struct Lisp_Save_Value) + (struct Lisp_Buffer_Local_Value, struct Lisp_Overlay) + (struct Lisp_Objfwd, struct Lisp_Buffer_Objfwd): Add `gcmarkbit' field. + +2003-06-24 Dave Love + + * xterm.c (xim_initialize): Use XRegisterIMInstantiateCallback_arg6. + + * strftime.c: Test HAVE_SYS__MBSTATE_H, not __hpux. Merge changes + from gnulib. + +2003-06-21 Richard M. Stallman + + * fileio.c (Fwrite_region): Alternate messages + for append and partial write. + + * keyboard.c (read_key_sequence): When converting upcase fn key to + downcase, update fkey and keytran so `backspace' gets translated. + + * keyboard.c (read_avail_input): Don't signal SIGHUP in batch mode. + + * process.c (wait_reading_process_input): Don't signal SIGIO + in batch mode. + +2003-06-17 Kenichi Handa + + * Makefile.in (xselect.o): Don't depend on charset.h, coding.h, + composite.h. + + * xselect.c: Don't include charset.h, coding.h, composite.h. + (Qforeign_selection): New variable. + (syms_of_xselect): Intern and static it. + (selection_data_to_lisp_data): Return a unibyte string made from + data with `foreign-selection' text property. + +2003-06-15 Stefan Monnier + + * termhooks.h (EVENT_INIT): New macro. + + * keyboard.c (mark_kboards): Move from alloc.c. Mark kbd_buffer. + + * alloc.c (mark_kboards): Move to keyboard.c. + + * keyboard.c (record_asynch_buffer_change, read_avail_input): + * xterm.c (x_dispatch_event): + * xmenu.c (find_and_call_menu_selection): + * xdisp.c (handle_tool_bar_click): + * w32menu.c (menubar_selection_callback): + * sysdep.c (kbd_input_ast, read_input_waiting): + * msdos.c (dos_rawgetc): + * macterm.c (mac_check_for_quit_char): + * macmenu.c (menubar_selection_callback): + * gtkutil.c (xg_tool_bar_callback): Don't pass uninitialized + data to kbd_buffer_store_event. + +2003-06-15 Kim F. Storm + + * xdisp.c (x_fix_overlapping_area): Always use area relative X + to fix redisplay problem with tall characters (such as ,AC(B). + +2003-06-13 Kai Gro,A_(Bjohann + + * fileio.c (Fcopy_file): Doc fix: copies file modes, too. + +2003-06-12 Kenichi Handa + + * fileio.c (Fwrite_region): Save and restore restriction. + +2003-06-12 Dave Love + + * alloca.c (alloca): Declare arg as size_t. + + * sysdep.c: Remove redundant include of unistd.h, stdlib.h. + Use HAVE_DECL_SYS_SIGLIST, not SYS_SIGLIST_DECLARED. + +2003-06-11 Dave Love + + * search.c (shrink_regexp_cache): Use xrealloc. + (syms_of_search): Use xmalloc. + +2003-06-10 Kim F. Storm + + * xdisp.c (phys_cursor_in_rect_p): Fix 2003-05-24 change. + Adjust phys_cursor.x to be relative to window box, rather than + text area before checking -- to ensure cursor is redrawn when + exposing window. + Note: This also fixes a similar (older) bug if display margins + are present. + +2003-06-06 Kenichi Handa + + * coding.c (encoding_buffer_size): If coding->type is + coding_type_ccl, double magnification on CRLF encoding. + +2003-06-06 Jason Rumney + + * w32reg.c (SYSTEM_DEFAULT_RESOURCES): New constant. + (w32_get_string_resource): Try SYSTEM_DEFAULT_RESOURCES last. + + * xfaces.c (Finternal_face_x_get_resource): Do it on Windows and + Mac too. + +2003-06-05 Dave Love + + * strftime.c: Merge changes from gnulib. + + * mktime.c (__mktime_internal): Merge changes from gnulib + involving year 69 and dst2. + + Changes to merge with gnulib version and be consistent with the + autoconf test: + + * getloadavg.c: Set NLIST_STRUCT from HAVE_NLIST_H. + Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not NLIST_NAME_UNION. + [HAVE_LOCALE_H]: Include locale.h. + (getloadavg) [HAVE_SETLOCALE]: Run sscanf in C locale. + +2003-06-05 Kim F. Storm + + * window.c (coordinates_in_window): Convert X and Y to window + relative coordinates inside mode-line and header-line parts. + Convert X and Y to margin area relative coordinates inside left + and right display margin parts. + +2003-06-05 Jason Rumney + + * w32fns.c (add_system_logical_colors_to_map): New function. + (Fx_open_connection): Use it. + +2003-06-04 Stefan Monnier + + * process.c (allocate_pty): Revert part of the previous patch. + (Faccept_process_output): Simplify. + +2003-06-04 Jason Rumney + + * termhooks.h (enum event_kind): Remove MOUSE_WHEEL_EVENT. + + * keyboard.c (Qmouse_wheel, mouse_wheel_syms) + (lispy_mouse_wheel_names): Remove. + (syms_of_keyboard): Remove Qmouse_wheel and mouse_wheel_syms. + Always define drag_and_drop_syms. + + * macterm.c (XTread_socket): Map mouse wheel events to Emacs + WHEEL_EVENT events. + +2003-06-03 Stefan Monnier + + * xdisp.c (update_tool_bar): Add missing UNGCPRO. + + * buffer.c (init_buffer_once): Make kill-buffer-hook permanent-local. + +2003-06-03 Jan Dj,Ad(Brv + + * gtkutil.c (make_menu_item): Make sure we don't crash on a NULL + menu item label. + +2003-06-03 Richard M. Stallman + + * window.c (Fwindow_edges): Doc fix. + (Fwindow_pixel_edges, Fwindow_inside_edges) + (Fwindow_inside_pixel_edges): New functions. + (syms_of_window): defsubr them. + + * window.h (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS) + (WINDOW_MODE_LINE_LINES, WINDOW_HEADER_LINE_LINES): New macros. + +2003-06-02 Stefan Monnier + + * dispnew.c (Fsit_for): Don't lie about the number of args. + +2003-06-02 Dave Love + + * callproc.c: Use HAVE_FCNTL_H, not USG5. + (syms_of_callproc) : Doc fix. + + * doc.c: Use HAVE_FCNTL_H, not USG5. + + * xfaces.c (font_rescale_ratio): Fix for K&R. + + * termcap.c: Use HAVE_FCNTL_H, not _POSIX_VERSION. + + * mem-limits.h: Use HAVE_SYS_RESOURCE_H, HAVE_SYS_VLIMIT_H. + + * lread.c [HAVE_FCNTL_H]: Include fcntl.h. + + * gtkutil.c: Include keyboard.h, charset.h, coding.h. + (xg_create_frame_widgets): Use ENCODE_UTF_8. + + * xterm.c (Qutf_8): Moved to coding.c + + * xmenu.c (ENCODE_MENU_STRING): New. + (list_of_panes, list_of_items, digest_single_submenu, xmenu_show): + Use it. + + * coding.h (ENCODE_UTF_8): New. + (Qutf_8): Declare. + + * coding.c (Qutf_8): New. + (syms_of_coding): Intern it. + + * fns.c: Doc fixes. + +2003-06-02 Kenichi Handa + + * buffer.c (Fset_buffer_multibyte): Fix previous change. + +2003-06-01 Stefan Monnier + + * lread.c (openp): Make sure STR is a string. + +2003-06-01 David Ponce + + * termhooks.h (enum event_kind): Added new WHEEL_EVENT event. + Declare MOUSE_WHEEL_EVENT only if MAC_OSX defined. + + * keyboard.c (Qmouse_wheel): Declare only if MAC_OSX defined. + (mouse_wheel_syms, lispy_mouse_wheel_names): Likewise. + (discard_mouse_events): Discard WHEEL_EVENT events too. + (lispy_wheel_names, wheel_syms): New. + (syms_of_keyboard): Init and staticpro `wheel_syms'. Init and + staticpro `Qmouse_wheel' and `mouse_wheel_syms' only if MAC_OSX + defined. + (make_lispy_event): Add WHEEL_EVENT handler. + + * w32term.c (construct_mouse_wheel): Construct WHEEL_EVENT. + (w32_read_socket): Map w32 WM_MOUSEWHEEL events to Emacs + WHEEL_EVENT events. + +2003-05-31 John Paul Wallington + + * Makefile.in (lisp, shortlisp): byte-run, float-sup, map-ynp, and + timer are in lisp/emacs-lisp. + +2003-05-31 Kenichi Handa + + * buffer.c (Fset_buffer_multibyte): Correctly recover a narrowed + region when a buffer is changed to unibyte. + + * charset.h (VALID_LEADING_CODE_P): New macro. + (UNIBYTE_STR_AS_MULTIBYTE_P): Check more rigidly. + + * coding.c (DECODE_EMACS_MULE_COMPOSITION_CHAR): If coding->flags + is nonzero, accept multibyte form of eight-bit-control chars. + (decode_composition_emacs_mule): Likewise. + (decode_coding_emacs_mule): Likewise. + (encode_coding_emacs_mule): If coding->flags is nonzero, produce + multibyte form of eight-bit-control chars. + + * fileio.c (Qauto_save_coding, auto_save_coding): New variables. + (Finsert_file_contents): If coding-system-for-read is bound to + Qauto_save_coding, use the coding system emacs-mule with special + setting for recovering a file. + (choose_write_coding_system): On auto saving, use the coding + system emacs-mule with special setting for auto saving. + (syms_of_fileio) : Intern and staticpro it. + +2003-05-30 Kenichi Handa + + * coding.c (ccl_coding_driver): Set ccl->eight_bit_control + properly before calling ccl_driver. + + * ccl.h (struct ccl_program) : Comment fixed. + + * ccl.c (CCL_WRITE_CHAR): Increment extra_bytes only when it is + nonzero. + (ccl_driver): Initialize extra_bytes to ccl->eight_bit_control. + (setup_ccl_program): Initialize ccl->eight_bit_control to zero. + +2003-05-29 Glenn Morris + + * xfaces.c (realize_default_face): Do not abort if lface is + non-existent - reverts change from 2003-05-19. + +2003-05-29 Kenichi Handa + + * coding.c (decode_coding_iso2022): Pay attention to the byte + sequence of CTEXT extended segment, and retain those bytes as is. + +2003-05-28 Kenichi Handa + + * coding.c (ENCODE_UNSAFE_CHARACTER): Adjusted for the name change + of CODING_REPLACEMENT_CHARACTER. + (decode_coding_iso2022): If CODING_FLAG_ISO_SAFE, set + CODING_MODE_INHIBIT_UNENCODABLE_CHAR flag in coding->mode, and + check this flag on encoding. + (encode_coding_sjis_big5): Check + CODING_MODE_INHIBIT_UNENCODABLE_CHAR flag of coding->mode. + (Fset_terminal_coding_system_internal): Set + CODING_MODE_INHIBIT_UNENCODABLE_CHAR flag in terminal_coding.mode + instead of setting CODING_FLAG_ISO_SAFE flag in + terminal_coding.flags. + + * coding.h (CODING_REPLACEMENT_CHARACTER): Renamed from + CODING_INHIBIT_CHARACTER_SUBSTITUTION. + (CODING_MODE_INHIBIT_UNENCODABLE_CHAR): New macro. + +2003-05-28 Richard M. Stallman + + * print.c (syms_of_print) : Doc fix. + + * eval.c (unbind_to): Move init of this_binding to separate statement. + +2003-05-28 Kim F. Storm + + * xdisp.c (expose_window): Fix error in calculation of + window relative coordinates of area to redisplay. + +2003-05-27 Jason Rumney + + * w32term.c (GET_WHEEL_DELTA_WPARAM): New macro. + +2003-05-27 David Ponce + + Handle W32 mouse wheel events as mouse click events, like in X. + + * keyboard.c (make_lispy_event) [WINDOWSNT]: Don't handle + MOUSE_WHEEL_EVENT anymore. + + * w32term.c (construct_mouse_wheel): Result is a MOUSE_CLICK_EVENT. + Scrolling down/up the mouse wheel is respectively mapped to mouse + button 4 and 5. + (w32_read_socket): Map w32 WM_MOUSEWHEEL events to Emacs + MOUSE_CLICK_EVENT events. Forward w32 MSH_MOUSEWHEEL events as + WM_MOUSEWHEEL events. + +2003-05-27 Andreas Schwab + + * buffer.c (syms_of_buffer) : Doc fix. + + * xdisp.c (try_window_id): Avoid aborting if PT is inside a + partially visible line. + + * alloc.c (Fgarbage_collect): Fix last change. + +2003-05-26 John Paul Wallington + + * xfns.c (Fx_create_frame): Don't call Qface_set_after_frame_default. + +2003-05-25 Stefan Monnier + + * window.c (Fset_window_buffer): Add type of `keep_margins'. + (Fset_window_fringes, Fset_window_scroll_bars): Declare before use. + + * window.h (window_box_text_cols): Declare. + + * xdisp.c (window_text_bottom_y, draw_row_fringe_bitmaps) + (x_draw_vertical_border): Remove unused var `f'. + + * xfaces.c (build_scalable_font_name): Remove `unused var + pixel_size' warning. + + * xfns.c (png_load): Remove `unused vars intent, image_gamma' warning. + + * unexelf.c (unexec): Remove `unused var n' warning. + + * strftime.c (my_strftime_localtime_r): Remove `defined but + unused' warning. + + * process.c (allocate_pty): Remove `unused var stb' and + `cp might be used uninitialized' warnings. + + * dispnew.c (mode_line_string): Remove unused var `f'. + + * coding.c (find_safe_codings): Remove unused var `i'. + + * bytecode.c (Fbyte_code): Remove `unused val' warning. + + * buffer.c (Fkill_buffer): Remove unused var `list'. + + * alloc.c (Fgarbage_collect): Remove `unused var tail' warning. + +2003-05-25 Jan Dj,Ad(Brv + + * frame.c (make_frame): Condition want_fullscreen with + HAVE_WINDOW_SYSTEM. + +2003-05-25 Juanma Barranquero + + * window.c (Fset_window_scroll_bars): Fix typo in argument name. + (Fwindow_scroll_bars): Fix typo in docstring. + +2003-05-24 Kim F. Storm + + The following changes serve several purposes: + + 1) Swap the position of fringes and display margins in windows, i.e. + the fringes are now displayed between the margins and the text area + (by default). + + 2) Allow fringe and scroll bar parameters to be set per-buffer and + per-window (like display margins). Such settings are now stored + in window configurations, preserved when frames are resized, and + copied when windows are split vertically or horizontally. + Several bugs related to display margins have been fixed. + + 3) Consistently use FRAME_FONT and FRAME_FONTSET macros. + + 4) Use FRAME_COLUMN_WIDTH (f) consistently throughout the code + rather than FRAME_WIDTH (FRAME_FONT (f)). + + 5) Introduce a consistent naming of variables, members and macros + depending on whether their value is measured in pixels or in + canonical columns/lines. Pixel dimensions are named *_width and + *_height, while canonical columns/lines are named *_cols and + *_lines. Pixel positions are named *_x and *_y, while column/line + positions are named *_col and *_line. + + 6) Consolidate more of the X, W32, and MAC gui code by moving + common data into struct frame, and generalize it for the non-gui + case by using suitable defaults. + + 7) Cleanup and consolidate the macros controlling frame and window + layout into frame.h and window.h, and generalize the use of the + various window_box_* functions (enhanced to handle the new fringe + position and the per-window fringe and scroll bar settings). + + * frame.h (struct frame): Rename members height to text_lines, + width to text_cols, window_height to total_lines, window_width to + total_cols, new_height to new_text_lines, new_width to + new_text_cols. All uses changed. + (struct frame): New members which consolidate common members of + x_output, w32_output, and mac_output structures: left_pos, + top_pos, pixel_height, pixel_width, x_pixels_diff, y_pixels_diff, + win_gravity, size_hint_flags, border_width, internal_border_width, + line_height, fringe_cols, left_fringe_width, right_fringe_width, + want_fullscreen. All uses changed. + (struct frame): New member column_width contaning the canonical + column width, analogue to line_height. All uses changed. + (struct frame): Rename members scroll_bar_pixel_width to + config_scroll_bar_width, and scroll_bar_cols to + config_scroll_bar_cols. All uses changed. + (struct frame): New member scroll_bar_actual_width which + consolidates and renames the vertical_scroll_bar_extra member of + x_output, w32_output, and mac_output structures. All uses changed. + (FRAME_PIXEL_HEIGHT): Renamed from PIXEL_HEIGHT and moved + from x/w32/macterm.h files. All uses changed. Also change code + which referred to f->output_data...->pixel_height. + (FRAME_PIXEL_WIDTH): Renamed from PIXEL_WIDTH and moved + from x/w32/macterm.h files. All uses changed. Also change code + which referred to f->output_data...->pixel_width. + (FRAME_LINES): Renamed from FRAME_HEIGHT. All uses changed. + Also change code which referred to f->height. + (FRAME_COLS): Renamed from FRAME_WIDTH. All uses changed. + Also change code which referred to f->width. + (FRAME_NEW_HEIGHT, FRAME_NEW_WIDTH): Remove macros; change uses + to update new_text_lines and new_text_cols members directly. + (FRAME_CONFIG_SCROLL_BAR_WIDTH): Renamed from + FRAME_SCROLL_BAR_PIXEL_WIDTH. All uses changed. + (FRAME_CONFIG_SCROLL_BAR_COLS): Renamed from + FRAME_SCROLL_BAR_COLS. All uses changed. + (FRAME_LEFT_SCROLL_BAR_COLS, FRAME_RIGHT_SCROLL_BAR_COLS): + Renamed from FRAME_LEFT_SCROLL_BAR_WIDTH and + FRAME_RIGHT_SCROLL_BAR_WIDTH, resp. All uses changed. + (FRAME_SCROLL_BAR_AREA_WIDTH, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH) + (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH): New macros. + (FRAME_TOTAL_COLS): Renamed from FRAME_WINDOW_WIDTH. + (SET_FRAME_COLS): Renamed from SET_FRAME_WIDTH. + (FRAME_TOTAL_COLS_ARG): Renamed from FRAME_WINDOW_WIDTH_ARG. + (WINDOW_VERTICAL_SCROLL_BAR_COLUMN): Remove unused macro. + (WINDOW_VERTICAL_SCROLL_BAR_HEIGHT): Remove unused macro. + (FRAME_LINE_HEIGHT): Renamed from CANON_Y_UNIT. Unconditionally + return line_height member (it now has proper value also for + non-window frames). + (FRAME_COLUMN_WIDTH): Renamed from CANON_X_UNIT. Unconditionally + return new column_width member (rather than the default font width). + (FRAME_FRINGE_COLS, FRAME_LEFT_FRINGE_WIDTH) + (FRAME_RIGHT_FRINGE_WIDTH): Renamed from FRAME_X_... and moved + from x/w32/macterm.h files. Unconditionally return corresponding + member of frame structure (they now have proper values also for + non-window frames). + (FRAME_TOTAL_FRINGE_WIDTH): Renamed from FRAME_FRINGE_WIDTH. + Calculate return value from left and right widths. + (FRAME_INTERNAL_BORDER_WIDTH): Unconditionally return + internal_border_width member (has proper value for non-window frame). + (FRAME_PIXEL_X_FROM_CANON_X): Renamed from PIXEL_X_FROM_CANON_X. + (FRAME_PIXEL_Y_FROM_CANON_Y): Renamed from PIXEL_Y_FROM_CANON_Y. + (FRAME_CANON_X_FROM_PIXEL_X): Renamed from CANON_X_FROM_PIXEL_X. + (FRAME_CANON_Y_FROM_PIXEL_Y): Renamed from CANON_Y_FROM_PIXEL_Y. + (FRAME_LINE_TO_PIXEL_Y): Renamed from CHAR_TO_PIXEL_ROW, + consolidated from xterm.h, macterm.h, and w32term.h. + (FRAME_COL_TO_PIXEL_X): Renamed from CHAR_TO_PIXEL_COL, + consolidated from xterm.h, macterm.h, and w32term.h. + (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Renamed from + CHAR_TO_PIXEL_WIDTH consolidated from x/mac/w32term.h. + (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT): Renamed from + CHAR_TO_PIXEL_HEIGHT consolidated from x/mac/w32term.h. + (FRAME_PIXEL_Y_TO_LINE): Renamed from PIXEL_TO_CHAR_ROW + consolidated from x/mac/w32term.h. + (FRAME_PIXEL_X_TO_COL): Renamed from PIXEL_TO_CHAR_COL + consolidated from x/mac/w32term.h. + (FRAME_PIXEL_WIDTH_TO_TEXT_COLS): Renamed from + PIXEL_TO_CHAR_WIDTH consolidated from x/mac/w32term.h. + (FRAME_PIXEL_HEIGHT_TO_TEXT_LINES): Renamed from + PIXEL_TO_CHAR_HEIGHT consolidated from x/mac/w32term.h. + + * window.h (struct window): Rename members left to left_col, + top to top_line, height to total_lines, width to total_cols, + left_margin_width to left_margin_cols, right_margin_width to + right_margin_cols, orig_height to orig_total_lines, orig_top to + orig_top_line. All uses changed. + (struct window): New members left_fringe_width, right_fringe_width, + fringes_outside_margins, scroll_bar_width, vertical_scroll_bar_type. + (WINDOW_XFRAME, WINDOW_FRAME_COLUMN_WIDTH, WINDOW_FRAME_LINE_HEIGHT): + New macros primarily used to simplify other macros. + (WINDOW_TOTAL_COLS): New macro. Change relevant code that + referred to XINT (w->width). + (WINDOW_TOTAL_LINES): New macro. Change relevant code that + referred to XINT (w->height). + (WINDOW_TOTAL_WIDTH): New macro. Change relevant code that + referred to XINT (w->width) * canon_x_unit. + (WINDOW_TOTAL_HEIGHT): New macro. Change relevant code that + referred to XINT (w->height) * canon_y_unit. + (WINDOW_LEFT_EDGE_COL): New macro. Change relevant code that + referred to XINT (w->left). + (WINDOW_RIGHT_EDGE_COL): Renamed from WINDOW_RIGHT_EDGE. Change + all uses and code that referred to XINT (w->left) + XINT (w->width). + (WINDOW_TOP_EDGE_LINE): New macro. Change relevant code that + referred to XINT (w->top). + (WINDOW_BOTTOM_EDGE_LINE): New macro. Change relevant code that + referred to XINT (w->top) + XINT (w->height). + (WINDOW_LEFT_EDGE_X): New macro. Change relevant code that + referred to XINT (w->left) * canon_x_unit. + (WINDOW_RIGHT_EDGE_X): New macro. Change relevant code that + referred to (XINT (w->left) + XINT (w->width)) * canon_x_unit. + (WINDOW_TOP_EDGE_Y): New macro. Change relevant code that + referred to XINT (w->top) * canon_y_unit. + (WINDOW_BOTTOM_EDGE_Y): New macro. Change relevant code that + referred to (XINT (w->top) + XINT (w->height)) * canon_y_unit. + (WINDOW_LEFTMOST_P): New macro. + (WINDOW_BOX_LEFT_EDGE_COL): Renamed from WINDOW_LEFT_MARGIN. + All uses changed. + (WINDOW_BOX_RIGHT_EDGE_COL): Renamed from WINDOW_RIGHT_MARGIN. + All uses changed. + (WINDOW_BOX_LEFT_EDGE_X): Renamed from + WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X, moved from dispextern.h. + Do not exclude left fringe width. + (WINDOW_BOX_RIGHT_EDGE_X): Renamed from + WINDOW_DISPLAY_RIGHT_EDGE_PIXEL_X, moved from dispextern.h. + Do not exclude fringe widths. + (WINDOW_LEFT_FRINGE_WIDTH, WINDOW_RIGHT_FRINGE_WIDTH) + (WINDOW_FRINGE_COLS, WINDOW_TOTAL_FRINGE_WIDTH): New macros. + Change relevant code that referred to FRAME_LEFT_FRINGE_WIDTH, + FRAME_RIGHT_FRINGE_WIDTH, FRAME_FRINGE_COLS, and + FRAME_TOTAL_FRINGE_WIDTH to allow per-window fringe settings. + (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS): New macro. + (WINDOW_VERTICAL_SCROLL_BAR_TYPE, WINDOW_HAS_VERTICAL_SCROLL_BAR) + (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT) + (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT) + (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS): + New macros. Change code which referenced corresponding + FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS, + FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT, + FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT, + FRAME_SCROLL_BAR_PIXEL_WIDTH, and FRAME_SCROLL_BAR_COLS macros to + allow per-window scroll-bar settings. + (WINDOW_LEFT_SCROLL_BAR_COLS, WINDOW_RIGHT_SCROLL_BAR_COLS): New macros. + (WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH): New macro. Change code that + referred to FRAME_LEFT_SCROLL_BAR_WIDTH. + (WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH): New macro. Change code + that referred to FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT and + FRAME_SCROLL_BAR_WIDTH. + (WINDOW_SCROLL_BAR_COLS, WINDOW_SCROLL_BAR_AREA_WIDTH) + (WINDOW_SCROLL_BAR_AREA_X): New macros. + (WINDOW_HEADER_LINE_HEIGHT): Renamed from + WINDOW_DISPLAY_HEADER_LINE_HEIGHT, moved from dispextern.h. + (WINDOW_BOX_HEIGHT_NO_MODE_LINE): Renamed from + WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE, moved from dispextern.h. + (WINDOW_BOX_TEXT_HEIGHT): Renamed from + WINDOW_DISPLAY_PIXEL_WIDTH, moved from dispextern.h. + (WINDOW_TO_FRAME_PIXEL_X, WINDOW_TO_FRAME_PIXEL_Y) + (FRAME_TO_WINDOW_PIXEL_X, FRAME_TO_WINDOW_PIXEL_Y) + (WINDOW_TEXT_TO_FRAME_PIXEL_X): Moved here from dispextern.h. + (WINDOW_LEFT_MARGIN_WIDTH): Renamed from + WINDOW_DISPLAY_LEFT_AREA_PIXEL_WIDTH, moved from dispextern.h. + (WINDOW_RIGHT_MARGIN_WIDTH): Renamed from + WINDOW_DISPLAY_RIGHT_AREA_PIXEL_WIDTH, moved from dispextern.h. + (window_from_coordinates): Update prototype. + (Fset_window_buffer): Update EXFUN. + (set_window_buffer): Update prototype. + + * dispextern.h (struct glyph_matrix): Rename members window_left_x + to window_left_col, window_top_y to window_top_line. All uses + changed. + (FRAME_INTERNAL_BORDER_WIDTH_SAFE): Remove macro; can now safely + use FRAME_INTERNAL_BORDER_WIDTH macro instead as + internal_border_width is now set to 0 for non-window frames. + (WINDOW_DISPLAY_PIXEL_WIDTH, WINDOW_DISPLAY_PIXEL_HEIGHT) + (WINDOW_DISPLAY_MODE_LINE_HEIGHT, WINDOW_DISPLAY_HEADER_LINE_HEIGHT) + (WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE, WINDOW_DISPLAY_TEXT_HEIGHT) + (WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X, WINDOW_DISPLAY_RIGHT_EDGE_PIXEL_X) + (WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y, WINDOW_DISPLAY_BOTTOM_EDGE_PIXEL_Y) + (WINDOW_TO_FRAME_PIXEL_X, WINDOW_TO_FRAME_PIXEL_Y) + (FRAME_TO_WINDOW_PIXEL_X, FRAME_TO_WINDOW_PIXEL_Y) + (WINDOW_DISPLAY_LEFT_AREA_PIXEL_WIDTH) + (WINDOW_DISPLAY_RIGHT_AREA_PIXEL_WIDTH, WINDOW_WANTS_MODELINE_P): + Move to window.h and renamed [see window.h changes]. + (WINDOW_AREA_TO_FRAME_PIXEL_X, WINDOW_AREA_PIXEL_WIDTH) + (WINDOW_DISPLAY_TEXT_AREA_PIXEL_WIDTH): Remove macros. + (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P): + Use WINDOW_TOTAL_LINES. + (frame_update_line_height): Remove prototype. + + * buffer.h (struct buffer): Rename members measured in columns: + left_margin_width to left_margin_cols, right_margin_width to + right_margin_cols. All uses changed. + New members left_fringe_width, right_fringe_width, + fringes_outside_margins for per-buffer fringe settings. + New members scroll_bar_width and vertical_scroll_bar_type for + per-buffer scroll bar settings. + + * buffer.c (init_buffer_once): Set buffer_defaults and + buffer_local_flags for new buffer-local variables + left_fringe_width, right_fringe_width, fringes_outside_margins, + scroll_bar_width, and vertical_scroll_bar_type. + (syms_of_buffer): Defvar_per_buffer them, and defvar_lisp_nopro + default-* variables for them. + + * dispnew.c: Make (many) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + (mode_line_string): No need to adjust width for mode lines, as it + is already adjusted by the caller. + (marginal_area_string): Handle fringes inside/outside margins. + + * frame.c: Make (many) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + (make_frame): Initialize left_fringe_width, right_fringe_width, + fringe_cols, scroll_bar_actual_width, border_width, + internal_border_width, column_width, line_height, x_pixels_diff, + y_pixels_diff, want_fullscreen, size_hint_flags, and win_gravity + members with values suitable for a non-window frames. + + * gtkutil.c: Make (many) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + + * indent.c: Make (few) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + + * keyboard.c: Make (many) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + (make_lispy_event): Use window positions returned from + window_from_coordinates when constructing the lisp event for + MOUSE_CLICK_EVENT and DRAG_N_DROP_EVENT, rather than calculating + (incorrect) values locally. + (make_lispy_movement): Use window positions returned from + window_from_coordinates when constructing the lisp event, rather + than calculating (incorrect) values locally. + + * scroll.c: Make (some) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + + * sunfns.c (Fsun_menu_internal): Adapt to per-window fringes and + scroll-bars. + + * sysdep.c: Make (few) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + + * term.c: Make (some) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + + * widget.c: Make (few) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + + * window.c: Make (many) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + (make_window): Initialize new members + left_margin_cols, right_margin_cols, left_fringe_width, + right_fringe_width, fringes_outside_margins, scroll_bar_width, + and vertical_scroll_bar_type. + (coordinates_in_window): Adapted to new fringe/margin positions + and per-window fringes and scroll-bars. + Fix bug related to incorrectly adjusting coordinates by + frame's internal_border_width (the effect normally negible since + the internal_border_width is typically 0 or 1 pixel, but very + noticeable for an internal_border_width of e.g. 25 pixels). + Upon successful return (other than ON_NOTHING), the coordinates + are now always properly converted to window relative for the + given display element. + (window_from_coordinates): Add new parameters wx and wy to + return the window relative x and y position in the returned + window and part. A null arg means, don't return the position. + All callers changed. + (adjust_window_margins): New function which may reduce the width + of the display margins if a window's text area is too small after + resizing or splitting windows. + (size_window): Fix bug that did not account for display margin + widths when checking the minimum width of a window; use + adjust_window_margins. + (set_window_buffer): Call Fset_window_fringes and + Fset_window_scroll_bars to setup per-window elements. + Add new arg KEEP_MARGINS_P. Non-nil means to keep window's + existing display margin, fringe widths, and scroll bar settings + (e.g. after splitting a window or resizing the frame). + All callers changed. + (Fset_window_buffer): New arg KEEP_MARGINS. All callers changed. + (Fsplit_window): Duplicate original window's display margin, + fringe, and scroll-bar settings; then call Fset_window_buffer with + KEEP_MARGINS non-nil. This fixes a bug which caused a split + window to only preserve the display margins in one of the windows. + When splitting horizontally, call adjust_window_margins on both + windows to ensure that the text area of the new windows is non too + narrow. This fixes a bug which could cause emacs to trap if the + width of the split window was less than the width of the display + margins. + (window_box_text_cols): Renamed from window_internal_width. + All uses changed. Adapt to per-window fringes and scroll bars. + Fix bug that caused vertical separator to be subtracted also on + window frames. Fix another bug that did not reduce the returned + value by the columns used for display margins. + (window_scroll_line_based): Fix bug related to scrolling too much + when display margins are present (implicitly fixed by the fix to + window_box_text_cols). + (scroll_left, scroll_right): Fix bug related to scrolling too far + by default when display margins are present (implicitly fixed by + the fix to window_box_text_cols). + (struct saved_window): Rename members left to left_col, top to + top_line, width to total_cols, height to total_lines, orig_top to + orig_top_line, orig_height to orig_total_lines. All uses changed. + New members left_margin_cols, right_margin_cols, + left_fringe_width, right_fringe_width, fringes_outside_margins, + scroll_bar_width, and vertical_scroll_bar_type for saving + per-window display elements. + (Fset_window_configuration): Restore display margins, fringes, + and scroll bar settings. This fixes a bug which caused display + margins to be discarded when saving and restoring a window + configuration. + (save_window_save): Save display margins, fringes, and scroll bar + settings. This fixes a bug which caused display margins to be + discarded when saving and restoring a window configuration. + (Fset_window_margins): Do nothing if display margins are not + really changed. Otherwise, call adjust_window_margins to ensure + the text area doesn't get too narrow. This fixes a bug which + could cause emacs to trap if setting display margins wider than + the width of the window. + (Fset_window_fringes): New defun to allow user to specifically set + this window's fringe widths and position vs. display margins. + (Fwindow_fringes): New defun to return window's actual fringe + settings. + (Fset_window_scroll_bars): New defun to allow user to specifically + set this window's scroll bar width and position. + (Fwindow_scroll_bars): New defun to return window's actual scroll + bar settings. + (compare_window_configurations): Also compare display margins, + fringes, and scroll bar settings. + (syms_of_window): Defsubr new defuns for fringe and scroll bars. + + * xdisp.c: Make (many) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + (window_box_width): Adapt to per-window fringes and scroll bars, + and new fringe vs. display margin position. Note that returned + value is no longer guaranteed to be a whole multiple of the frame + column width, since per-window fringes may now be any width. + (window_box_left_offset): New function like window_box_left, but + value is relative to left border of window (rather than frame). + (window_box_right_offset): New function like window_box_right, + but value is relative to left border of window. + (window_box_left): Adapt to per-window fringes and scroll bars, + and new fringe vs. display margin position. Simplify by using + WINDOW_LEFT_EDGE_X and window_box_left_offset. + (window_box): Allow null args for unnecessary return values; + change/simplify relevant callers. + (x_y_to_hpos_vpos): Adapt to per-window fringes and scroll bars, + and new fringe vs. display margin position. + Use window_box_left_offset and window_box_right_offset + (get_glyph_string_clip_rect): Adapt to per-window fringes and + scroll bars, and new fringe vs. display margin position. + Use WINDOW_LEFT_EDGE_X and WINDOW_TOTAL_WIDTH. + (draw_fringe_bitmap): Rework to handle per-window fringes and new + fringe vs. display margin position. + (hscroll_window_tree): Use window_box_width instead of window_box. + (redisplay_window): Adapt to per-window scroll bars. + (draw_glyphs): Rework to handle per-window fringes and scroll + bars, and new fringe vs. display margin position. + Use WINDOW_LEFT_EDGE_X, WINDOW_TOTAL_WIDTH, and window_box_left. + (x_clear_end_of_line): Adapt to per-window fringes and scroll + bars, and new fringe vs. display margin position. Fix bug which + increased total width of full_width rows by width of scroll bars + although window's total width already includes that. + (x_fix_overlapping_area): Simplify using window_box_left_offset. + (expose_area): Simplify using window_box_left_offset. + (x_draw_vertical_border): Handle per-window scroll bar settings, + mixing windows with left, right and no scroll bars. + + * xfaces.c [WINDOWSNT]: Move redefinition of FONT_WIDTH macro to + where it's used in x_list_fonts (for clarity). + (frame_update_line_height): Remove unused function; functionality + is now done directly when setting the default font in x_set_font. + + * xfns.c: Make (many) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + + * xmenu.c: Make (some) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + + * xterm.h (struct x_output): Move members left_pos, top_pos, + border_width, pixel_height, pixel_width, line_height, + internal_border_width, vertical_scroll_bar_extra, + left_fringe_width, right_fringe_width, fringe_cols, + fringes_extra, win_gravity, size_hint_flags, want_fullscreen, + x_pixels_diff, and y_pixels_diff to struct frame (frame.h). + (FRAME_INTERNAL_BORDER_WIDTH, FRAME_LINE_HEIGHT): Move to frame.h. + (FRAME_DEFAULT_FONT_WIDTH): Remove macro. + (PIXEL_WIDTH, PIXEL_HEIGHT) + (FRAME_X_FRINGE_COLS, FRAME_X_FRINGE_WIDTH) + (FRAME_X_LEFT_FRINGE_WIDTH, FRAME_X_RIGHT_FRINGE_WIDTH): Moved to + frame.h and renamed [see frame.h changes]. + (CHAR_TO_PIXEL_ROW, CHAR_TO_PIXEL_COL, CHAR_TO_PIXEL_WIDTH) + (CHAR_TO_PIXEL_HEIGHT, PIXEL_TO_CHAR_ROW, PIXEL_TO_CHAR_COL) + (PIXEL_TO_CHAR_WIDTH, PIXEL_TO_CHAR_HEIGHT): Moved to frame.h + and renamed [see frame.h changes]. + + * xterm.c: Make (several) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + (x_draw_glyph_string_box): Adapt to per-window fringes and + scroll-bars. + (scroll_run): Adapt to new fringe position. + (glyph_rect): Use window coordinates returned from + window_from_coordinates rather than frame_to_window_pixel_xy. + (XTset_vertical_scroll_bar): Adapt to per-window fringes and + scroll-bars. + (handle_one_xevent): Simplify a USE_GTK conditional. + (x_clip_to_row): Remove superfluous whole_line_p arg and code + (fringes are now inside margins, i.e. always in the clipping area). + All callers changed. + (x_new_font): Set FRAME_COLUMN_WIDTH and FRAME_LINE_HEIGHT + directly, then call compute_fringe_widths. Don't call + frame_update_line_height. + + * w32term.h (struct w32_output): Move members left_pos, top_pos, + border_width, pixel_height, pixel_width, line_height, + internal_border_width, vertical_scroll_bar_extra, + left_fringe_width, right_fringe_width, fringe_cols, + fringes_extra, win_gravity, size_hint_flags, want_fullscreen, + x_pixels_diff, and y_pixels_diff to struct frame (frame.h). + (FRAME_INTERNAL_BORDER_WIDTH, FRAME_LINE_HEIGHT): Move to frame.h. + (FRAME_DEFAULT_FONT_WIDTH): Remove macro. + (PIXEL_WIDTH, PIXEL_HEIGHT) + (FRAME_X_FRINGE_COLS, FRAME_X_FRINGE_WIDTH) + (FRAME_X_LEFT_FRINGE_WIDTH, FRAME_X_RIGHT_FRINGE_WIDTH): Moved to + frame.h and renamed [see frame.h changes]. + (CHAR_TO_PIXEL_ROW, CHAR_TO_PIXEL_COL, CHAR_TO_PIXEL_WIDTH) + (CHAR_TO_PIXEL_HEIGHT, PIXEL_TO_CHAR_ROW, PIXEL_TO_CHAR_COL) + (PIXEL_TO_CHAR_WIDTH, PIXEL_TO_CHAR_HEIGHT): Moved to frame.h + and renamed [see frame.h changes]. + + * w32term.c: Make (several) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + (x_draw_glyph_string_box): Adapt to per-window fringes and + scroll-bars. + (glyph_rect): Use window coordinates returned from + window_from_coordinates rather than frame_to_window_pixel_xy. + (XTset_vertical_scroll_bar): Adapt to per-window fringes and + scroll-bars. + (w32_clip_to_row): Remove superfluous whole_line_p arg and code + (fringes are now inside margins, i.e. always in the clipping area). + All callers changed. + (x_new_font): Set FRAME_COLUMN_WIDTH and FRAME_LINE_HEIGHT + directly, then call compute_fringe_widths. Don't call + frame_update_line_height. + + * w32console.c: Make (few) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + + * w32fns.c: Make (many) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + + * w32menu.c: Make (few) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + + * macterm.h (struct mac_output): Move members left_pos, top_pos, + border_width, pixel_height, pixel_width, line_height, + internal_border_width, vertical_scroll_bar_extra, + left_fringe_width, right_fringe_width, fringe_cols, + fringes_extra, win_gravity, size_hint_flags, want_fullscreen, + x_pixels_diff, y_pixels_diff to struct frame (frame.h). + (FRAME_INTERNAL_BORDER_WIDTH, FRAME_LINE_HEIGHT): Move to frame.h. + (FRAME_DEFAULT_FONT_WIDTH): Remove macro. + (PIXEL_WIDTH, PIXEL_HEIGHT) + (FRAME_X_FRINGE_COLS, FRAME_X_FRINGE_WIDTH) + (FRAME_X_LEFT_FRINGE_WIDTH, FRAME_X_RIGHT_FRINGE_WIDTH): Moved to + frame.h and renamed [see frame.h changes]. + (CHAR_TO_PIXEL_ROW, CHAR_TO_PIXEL_COL, CHAR_TO_PIXEL_WIDTH) + (CHAR_TO_PIXEL_HEIGHT, PIXEL_TO_CHAR_ROW, PIXEL_TO_CHAR_COL) + (PIXEL_TO_CHAR_WIDTH, PIXEL_TO_CHAR_HEIGHT): Moved to frame.h + and renamed [see frame.h changes]. + + * macterm.c: Make (several) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + (x_draw_glyph_string_box): Adapt to per-window fringes and + scroll-bars. + (glyph_rect): Use window coordinates returned from + window_from_coordinates rather than frame_to_window_pixel_xy. + (XTset_vertical_scroll_bar): Adapt to per-window fringes and + scroll-bars. + (x_clip_to_row): Remove superfluous whole_line_p arg and code + (fringes are now inside margins, i.e. always in the clipping area). + All callers changed. + (x_new_font): Set FRAME_COLUMN_WIDTH and FRAME_LINE_HEIGHT + directly, then call compute_fringe_widths. Don't call + frame_update_line_height. + + * macfns.c: Make (several) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + (x_real_positions): Set f->x_pixels_diff and f->y_pixels_diff to 0. + + * macmenu.c: Make (few) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + + * msdos.h (struct x_output): Remove members left_pos, top_pos, + and line_height, and use corresponding new members in struct + frame. All uses changed. + (FRAME_LINE_HEIGHT, FRAME_INTERNAL_BORDER_WIDTH): Remove macros; + superseeded by corresponding macros in frame.h. + + * msdos.c: Make (several) trivial substitutions for renamed and + new macros in dispextern.h, frame.h and window.h. + (IT_note_mouse_highlight): Use updated window coordinates returned + by window_from_coordinates, rather than adjusting them locally. + (internal_terminal_init): No need to initialize line_height here; + it now defaults to 1. + +2003-05-24 Stefan Monnier + + * keyboard.c (read_key_sequence): Adjust fkey and keytran when + dropping `down' events. + +2003-05-24 Andreas Schwab + + * coding.c (find_safe_codings): Fix last change. + +2003-05-24 Istvan Marko (tiny change) + + * xfns.c (x_window): Fix typo from 2003-05-21 change. + +2003-05-23 Stefan Monnier + + * xdisp.c (display_mode_element): Increase max depth. + Simplify the error handling code. Use a different error string + for the case where we hit the depth limit. + + * lisp.h (Vfundamental_mode_abbrev_table): Don't declare. + + * buffer.c (reset_buffer_local_variables): Remove redundant setting. + +2003-05-21 Stefan Monnier + + * intervals.c (get_local_map): Don't get char-property of previous + point any more: get_pos_property already does it and better. + +2003-05-21 Dave Love + + [Merged from unicode branch.] + + * xfns.c (x_window, x_window): Use use_xim. + + * xterm.c (use_xim): Initialize. + (xim_open_dpy, xim_initialize, xim_close_dpy): Use use_xim. + (x_term_init): Maybe set use_xim. + + * xterm.h (use_xim) [HAVE_X_I18N]: Declare. + +2003-05-21 Jason Rumney + + * unexw32.c (_start): Remove _fmode initialization. + + * emacs.c (main) [WINDOWSNT]: Move it here. + +2003-05-20 Dave Love + + * s/gnu-linux.h (MAIL_USE_FLOCK): Make it conditional. + +2003-05-19 Richard M. Stallman + + * xfaces.c (Finternal_set_lisp_face_attribute): Handle Qunspecified + as value for QCfont attribute. + (realize_default_face): lface should already exist; crash if not. + Specify 0 for FORCE_P when calling set_lface_from_font_name. + + * frame.c (Fignore_event): Doc fix. + +2003-05-19 Kenichi Handa + + * coding.c (decode_coding_string): Handle post-read-conversion + even if the coding doesn't require decoding. + +2003-05-18 Richard M. Stallman + + * callproc.c (Fcall_process_region): Doc fix. + +2003-05-17 Stefan Monnier + + * lread.c (Fload): Print a message if package is obsolete. + + * window.c (Fselect_window): Add optional `norecord' arg. + (select_window_1): Fold into Fselect_window. + (select_window_norecord): New function. + (temp_output_buffer_show): Use it. Preserve current buffer. + + * window.h (Fselect_window): Update declaration. + + * window.c (delete_window, Fother_window, Fset_window_configuration): + * minibuf.c (read_minibuf): + * macterm.c (x_new_focus_frame): + * frame.c (do_switch_frame, Fset_frame_selected_window, Fdelete_frame): + * callint.c (Fcall_interactively): + * xterm.c (x_new_focus_frame): Pass nil as new arg to Fselect_window. + + * buffer.c (Fpop_to_buffer): Pass norecord to Fselect_window. + +2003-05-17 David Kastrup + + * process.c (read_process_output): Back out change from 2003-03-09. + +2003-05-17 Stefan Monnier + + * editfns.c (get_pos_property): Don't assume that `object' = nil. + + * textprop.c (text_property_stickiness): New arg `buffer'. + + * intervals.h (text_property_stickiness): New arg `buffer'. + (get_pos_property): Declare. + + * intervals.c (get_local_map): Use get_pos_property, to obey + stickiness and empty overlays. + (create_root_interval, graft_intervals_into_buffer): Use BEG. + (merge_properties, intervals_equal, merge_properties_sticky): + Use XCAR, XCDR. + (adjust_for_invis_intang): Pass new arg to text_property_stickiness. + +2003-05-17 Richard M. Stallman + + * minibuf.c (read_minibuf): If buffer is empty, record the default + in the history. + (Fminibuffer_complete_word): When deleting the overlap, take account + of its real position. + + * fns.c (map_char_table): Fix previous change. + + * syntax.c (find_defun_start): + When open_paren_in_column_0_is_defun_start, + return beginning of buffer. + + * lisp.h (map_char_table): Declare added arg. + + * fns.c (map_char_table): New arg TABLE gets the master table. + All calls changed. + Process default and inheritance, resorting to Faref if necessary. + + * keymap.c (Fset_keymap_parent, map_keymap, Fcopy_keymap) + (Faccessible_keymaps): Pass new arg to map_char_table. + + * fontset.c (Ffontset_info): Pass new arg to map_char_table. + + * casetab.c (set_case_table): Pass new arg to map_char_table. + + * data.c (let_shadows_buffer_binding_p): Make target of p volatile. + + * lisp.h (specbinding_func): New typedef. + (struct specbinding): Use specbinding_func, to put the `volatile' + in the right place. + + * alloc.c (Fgarbage_collect): Cast pointers into specpdl + to avoid GCC warning. + +2003-05-16 Ralph Schleicher (tiny change) + + * fileio.c (Fdelete_file): Handle symlinks pointing to directories. + +2003-05-15 Stefan Monnier + + * keyboard.c (apply_modifiers): Don't fill the other cache. + +2003-05-14 Stefan Monnier + + * .gdbinit-union: New file, for USE_LISP_UNION_TYPE users. + + * window.h (Qwindowp, Qwindow_live_p, Vwindow_list) + (Fwindow_end, Fselected_window, Fdelete_window, Fwindow_buffer) + (Fget_buffer_window, Fsave_window_excursion, Fsplit_window) + (Fset_window_configuration, Fcurrent_window_configuration) + (compare_window_configurations, Fcoordinates_in_window_p, Fwindow_at) + (Fpos_visible_in_window_p, mark_window_cursors_off) + (window_internal_height, window_internal_width, Frecenter) + (Fscroll_other_window, Fset_window_start, temp_output_buffer_show) + (replace_buffer_in_all_windows, init_window_once, init_window) + (syms_of_window, keys_of_window): Move from lisp.h. + * lisp.h: Move window.c declarations to window.h. + + * bytecode.c: Include window.h. + * emacs.c: Include window.h. + + * keyboard.c (make_lispy_event): Apply modifiers to multibyte-char key. + (keyremap): Add `parent' field. + (keyremap_step): Use it. Remove `parent' argument. + (read_key_sequence): Setup and use the new `parent' field. + +2003-05-11 Stefan Monnier + + * keyboard.c (adjust_point_for_property): Ensure termination. + +2003-05-10 Stefan Monnier + + * keyboard.c (follow_key): Remove dead variable `did_meta'. + (access_keymap_keyremap, keyremap_step): New funs, extracted from the + duplicated handling of function-key-map and key-translation-map + in read_key_sequence. + (read_key_sequence): Use them. + + * keyboard.c (adjust_point_for_property): Try harder to move point + to the non-sticky end of an invisible property. + + * xdisp.c (single_display_prop_intangible_p): Make `space' display + property intangible as well. + +2003-05-10 Andreas Schwab + + * xmenu.c (single_menu_item): Change last parameter to void* to + avoid warning. + +2003-05-09 Richard M. Stallman + + * print.c (Fprin1_to_string): Instead of gcpro, set abort_on_gc. + Bind Qinhibit_modification_hooks to t so there will be no GC. + Rename local `tem' to `save_deactivate_mark'. + + * eval.c (specpdl_ptr): Declare volatile. + (unbind_to): Copy the whole binding and decrement specpdl_ptr + before doing the work of unbinding it. + + * lisp.h (struct specbinding): Declare elements volatile. + (specpdl_ptr): Declare volatile. + + * Makefile.in (alloca.o): Specify -DDO_BLOCK_INPUT in compiling. + + * alloca.c: Test DO_BLOCK_INPUT rather than `emacs' + for use of BLOCK_INPUT and inclusion of lisp.h and blockinput.h. + +2003-05-08 Dave Love + + * coding.c (Vlast_coding_system_used): Doc fix. + +2003-05-07 Jason Rumney + + * fileio.c (Ffile_symlink_p): Let handlers handle symlinks even + when system does not support them. + +2003-05-05 Stefan Monnier + + * fileio.c (Qwrite_region_annotate_functions): New var. + (build_annotations): Use it to process the global part of the hook. + (syms_of_fileio): Init and staticpro it. + + * keyboard.c (safe_run_hooks_error): Display a message instead of + silently ignoring the error. + +2003-05-03 Stefan Monnier + + * keyboard.c (input_available_signal): Mark static. + (menu_bar_items): Use map_keymap. + (menu_bar_one_keymap): Remove. + (menu_bar_item): Adjust arglist (for use in map_keymap). + Properly hide a second binding when not both are keymaps. + + * xmenu.c (struct skp): New struct, to pass args through map_keymap. + (single_keymap_panes): Use it and map_keymap. + (single_menu_item): Use skp as well. + + * keymap.h (map_keymap_function_t): New type. + (map_keymap): Declare. + + * keymap.c (map_keymap_item, map_keymap_char_table_item, map_keymap) + (map_keymap_call, Fmap_keymap): New functions. + (syms_of_keymap): Defsubr map-keymap. + 2003-05-02 Jan Dj,Ad(Brv * gtkutil.c (create_dialog, make_widget_for_menu_item) (make_menu_item, create_menus, xg_update_menu_item): Don't call ..._with_mnemonic functions for menu items. +2003-05-01 Kenichi Handa + + * coding.c (coding_system_accept_latin_extra_p): Delete this + function. + (find_safe_codings): Pay attention to + the property tranlsation-table-for-encode of each codings. + (syms_of_coding): Give Qtranslation_table the extra slot number 2. + +2003-05-01 Stefan Monnier + + * eval.c (Funwind_protect): Use func=Fprogn rather than symbol=Qnil. + 2003-04-30 Stefan Monnier * eval.c (unbind_to): Don't handle symbol = Qnil any more.