(NUM_MOUSE_BUTTONS): Define.
[bpt/emacs.git] / src / ChangeLog
index 08aabfb..8cd6995 100644 (file)
@@ -1,3 +1,835 @@
+2000-04-12  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       * msdos.c (NUM_MOUSE_BUTTONS): Define.
+       (IT_frame_up_to_date): Support the buffer local value of
+       cursor-type, if defined.
+
+2000-04-10  Dave Love  <fx@gnu.org>
+
+       * editfns.c (preceding-char, following-char): Doc fix.
+
+2000-04-10  Ken Raeburn  <raeburn@gnu.org>
+
+       * Makefile.in (temacs): Revert 2000-03-12 change.
+
+2000-04-10  Jason Rumney  <jasonr@gnu.org>
+
+       * xfaces.c (realize_face): Change FRAME_X_P to FRAME_WINDOW_P.
+
+2000-04-10  Gerd Moellmann  <gerd@gnu.org>
+
+       * xdisp.c (setup_echo_area_for_printing): Choose an echo
+       area buffer, if it's not set up yet.
+
+       * indent.c (compute_motion): Set immediate_quit.
+
+2000-04-09  Gerd Moellmann  <gerd@gnu.org>
+
+       * xfaces.c (tty_suppress_bold_inverse_default_colors_p): New
+       variable.
+       (realize_tty_face): Suppress boldness if colors are the inverse of
+       the default colors, and tty_suppress_bold_inverse_default_colors_p
+       is set.
+       (Ftty_suppress_bold_inverse_default_colors): New function.
+       (syms_of_xfaces): Defsubr it.
+
+       * buffer.c (Frestore_buffer_modified_p): New function.
+       (syms_of_buffer): Defsubr it.
+
+2000-04-08  Ken Raeburn  <raeburn@gnu.org>
+
+       * charset.c (Fmake_char_internal): CHAR_COMPONENTS_VALID_P takes a
+       charset id (int) argument, not a charset (Lisp_Object).
+
+       * coding.h (code_convert_string): Declare.
+       * coding.c (code_convert_string_norecord): Pass an int, not a lisp
+       object, as the fourth argument to code_convert_string.
+
+       * fontset.c (make_fontset_for_ascii_face): Use XINT on return
+       value.
+       (Fset_fontset_font): Use EQ to compare lisp objects.
+
+2000-04-05  Ken Raeburn  <raeburn@gnu.org>
+
+       * intervals.h (SET_INTERVAL_PARENT): Use INT_LISPLIKE to test for
+       a pointer that looks like a lisp object.
+       (SET_INTERVAL_OBJECT): Don't explicitly compare the object with
+       zero, instead see whether it's an integer object, since they can't
+       have intervals.
+       (GET_INTERVAL_OBJECT): Simply assign to the destination.
+
+       * dispnew.c (allocate_matrices_for_frame_redisplay,
+       direct_output_forward_char): Use X(U)INT and make_number as needed
+       to convert between (unsigned) int values and lisp integers.
+       * keyboard.c (read_key_sequence): Likewise.
+       * lread.c (substitute_object_recurse): Likewise.
+       * fns.c (concat, hash_lookup, hash_remove): Likewise.
+       * minibuf.c (do_completion, Fminibuffer_complete_word,
+       Fminibuffer_completion_help): Likewise.
+       * term.c (produce_special_glyphs): Likewise.
+
+       * fileio.c (Fwrite_region): Use EQ when comparing lisp objects.
+       * print.c (print_preprocess, print_object): Likewise.
+
+       * search.c (compile_pattern): Use NILP when checking for nil.
+
+       * lisp.h (make_number) [!NO_UNION_TYPE && __GNUC__ >= 2 &&
+       __OPTIMIZE__]: Provide a GNU C macro version that handles
+       lisp-object unions.
+       (XSET) [!NO_UNION_TYPE]: Set the value field first, then the type
+       field, to better cope with ENABLE_CHECKING and calls that modify a
+       Lisp_Object using its old value.
+
+2000-04-04  Gerd Moellmann  <gerd@gnu.org>
+
+       * window.c (compare_window_configurations): Signal an error
+       if parameters C1 or C2 aren't window configurations.
+
+       * bytecode.c (Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
+       AFTER_POTENTIAL_GC calls around calls to functions that can
+       signal an error and thus invoke the debugger.
+
+2000-04-03  Gerd Moellmann  <gerd@gnu.org>
+
+       * fns.c (Fbase64_decode_region, Fbase64_decode_string): Signal
+       an error if decoding fails.
+
+       * keyboard.c (lispy_mouse_names): Variable removed.
+       (Vlispy_mouse_stem): New variable.
+       (syms_of_keyboard): Initialize Vlispy_mouse_stem.
+       (make_lispy_event) <mouse_click, scroll_bar_click>: Don't abort
+       for any mouse button number.  Increase size of mouse_syms and
+       button_down_location as needed.  Call modify_event_symbol with
+       different arguments.
+       (make_lispy_event) <scroll_bar_click> [USE_TOOLKIT_SCROLL_BARS]:
+       Call modify_event_symbol with different arguments.
+       (make_lispy_event) <w32_scroll_bar_click> [WINDOWSNT]: Don't abort
+       for any button number.  Call modify_event_symbol with different
+       arguments.
+       (modify_event_symbol): Rename NAME_ALIST to NAME_ALIST_OR_STEM.
+       Accept a string for NAME_ALIST_OR_STEM.
+
+       * lisp.h (larger_vector): Add prototype.
+
+       * fns.c (larger_vector): Make externally visible.
+
+       * termhooks.h (NUM_MOUSE_BUTTONS): Removed.
+
+2000-04-02  Stefan Monnier  <monnier@cs.yale.edu>
+
+       * regex.c (PTR_TO_OFFSET) [!emacs]: Remove.
+       (RE_MULTIBYTE_P, RE_STRING_CHAR_AND_LENGTH): New macros.
+       (GET_CHAR_BEFORE_2): Moved from charset.h plus fixed minor bug when
+       we are between str1 and str2.
+       (MAX_MULTIBYTE_LENGTH, CHAR_STRING) [!emacs]: Provide trivial default.
+       (PATFETCH): Use `TRANSLATE'.
+       (PATFETCH_RAW): Fetch multibyte char if applicable.
+       (PATUNFETCH): Remove.
+       (regex_compile): Rely on PATFETCH to do most of the multibyte magic.
+       When writing a char, write it directly into the pattern buffer rather
+       than going needlessly through a temp char-array.
+       (re_match_2_internal): Similarly, rely on RE_STRING_CHAR to do the
+       multibyte magic and remove the useless `#ifdef emacs'.
+       (bcmp_translate): Don't compare as multibyte chars when in a unibyte
+       buffer.
+
+       * regex.h (struct re_pattern_buffer): Make field `multibyte'
+       conditional on `emacs'.
+
+       * charset.h (GET_CHAR_BEFORE_2): Moved to regex.c.
+
+2000-04-01  Ken Raeburn  <raeburn@gnu.org>
+
+       * alloc.c (MARK_STRING, UNMARK_STRING, STRING_MARKED_P): Expand
+       non-union-type versions of XMARK and friends here, because XMARK
+       and friends won't work on an integer field if NO_UNION_TYPE is not
+       defined.
+       (make_number): Define as a function if it's not defined as a
+       macro.
+
+       * composite.c (run_composite_function): Use NILP when checking for
+       nil.
+       (syms_of_composite): Delete local var NARGS, pass an int as first
+       argument to Fmake_hash_table.
+
+       * editfns.c (text_property_stickiness): Use NILP to test
+       Lisp_Object boolean value.
+       (Fmessage_or_box): Don't use NILP to test int variable.
+       (Fformat): Use a temporary variable to avoid ENABLE_CHECKING
+       problems reading from and changing the same lisp value in an
+       XSETSTRING call.
+
+2000-04-01  Gerd Moellmann  <gerd@gnu.org>
+
+       * term.c (TN_no_color_video): New variable.
+       (term_init): Intitialize TN_no_color_video.
+       (enum no_color_bit): New enumeration.
+       (MAY_USE_WITH_COLORS_P): New macro.
+       (turn_on_face): Use it to determine if attributes may be used
+       combined with colors.
+
+2000-04-01  Ken Raeburn  <raeburn@gnu.org>
+
+       * window.c (CURBEG, CURSIZE): Don't overload lisp object lvalues
+       with int lvalues via casts; instead, just yield lisp object
+       lvalues.
+       (enlarge_window): Variable sizep now points to Lisp_Object.  Use
+       proper accessor macros.
+       (shrink_window_lowest_first): w->top is Lisp_Object; use XINT.
+       (grow_mini_window): Fix typo getting int value of root->height.
+
+       * xdisp.c (compute_string_pos): Fix order of arguments to
+       string_pos_nchars_ahead.
+       (handle_fontified_prop, add_to_log): Pass int, not Lisp_Object, as
+       count arg to variable-arg routines like Frun_hook_with_args and
+       Fformat.
+       (back_to_previous_visible_line_start)
+       (build_desired_tool_bar_string): Pass Lisp_Object, not int, to
+       fixed-arg routines like Fget_char_property and Fmake_string.
+       (reconsider_clip_changes): Use XINT when comparing integer lisp
+       objects, or passing them as int arguments.
+       (mark_window_display_accurate, insert_left_trunc_glyphs)
+       (append_space, extend_face_to_end_of_line): Use make_number when
+       storing or passing integer values as lisp objects.
+       (set_cursor_from_row, highlight_trailing_whitespace): Use
+       INTEGERP, not implicit test against zero, for glyph object.
+       (try_window_id): Don't use make_number when we want an int value.
+
+       * xfaces.c (xlfd_symbolic_value): Make last argument a
+       Lisp_Object, to be consistent with callers.
+       (Fbitmap_spec_p): Use XINT to get numeric value of height.
+       (lface_hash): Apply XFASTINT to lisp values before folding in.
+
+       * xfns.c (Fx_show_tip): Use make_number to get lisp objects to
+       fill in window width and height.  Pass an int, not a lisp object,
+       as first arg to Finsert.
+
+2000-04-01  Gerd Moellmann  <gerd@gnu.org>
+
+       * xfaces.c (realize_basic_faces): Block input while realizing
+       the faces.
+
+       * keyboard.c (lispy_mouse_names): Add additional mouse names.
+
+       * termhooks.h (NUM_MOUSE_BUTTONS): Increase to 15.
+
+2000-03-31  Gerd Moellmann  <gerd@gnu.org>
+
+       * xterm.c (x_produce_glyphs): When displaying unibyte text
+       or ASCII, handle case that per-char metric is null.
+
+2000-03-30  Ken Raeburn  <raeburn@gnu.org>
+
+       * lisp.h (NO_UNION_TYPE) [ENABLE_CHECKING]: Undef.
+
+       * lisp.h (XCONS, XSTRING, XSYMBOL, XFLOAT, XPROCESS, XWINDOW,
+       XSUBR, XBUFFER): Verify correct object type before returning
+       pointer, using eassert.
+       * frame.h (XFRAME): Likewise.
+
+       * buffer.c (Frename_buffer, Fset_buffer_multibyte,
+       swap_out_buffer_local_variables, Fmove_overlay): Don't apply
+       XSYMBOL, XBUFFER, etc, to values that may be nil or of the wrong
+       type.
+       * data.c (set_internal): Likewise.
+       * dispextern.h (WINDOW_WANTS_MODELINE_P,
+       WINDOW_WANTS_HEADER_LINE_P): Likewise.
+       * fileio.c (auto_save_1): Likewise.
+       * insdel.c (check_markers): Likewise.
+       * marker.c (buf_charpos_to_bytepos, unchain_marker): Likewise.
+       * undo.c (record_insert): Likewise.
+       * vmsproc.c (child_sig): Likewise.
+       * window.c (unshow_buffer, window_loop): Likewise.
+       * xterm.c (x_erase_phys_cursor): Likewise.
+
+2000-03-30  Gerd Moellmann  <gerd@gnu.org>
+
+       * xfns.c (free_image_cache): Free the cache structure itself
+       last, after all its members have been freed.
+
+       * lisp.h (xstrdup): Add prototype.
+
+       * alloc.c (xstrdup): Moved here from xfaces.c.
+       (allocating_for_lisp): Variable removed.
+       (lisp_malloc): Block input around the calls to malloc and
+       mem_insert.
+
+       * xfaces.c (realize_tty_face): Use find_symbol_value instead
+       of Fsymbol_value.
+       (xstrdup): Moved to alloc.c.
+
+2000-03-29  Ken Raeburn  <raeburn@gnu.org>
+
+       * scroll.c (CHECK_BOUNDS): Renamed from CHECK.
+
+       * emacs.c (main): Fix sense of no-loadup test.
+
+       * config.in (ENABLE_CHECKING): Undef.
+
+       * lisp.h (struct interval): Replace "parent" field with a union of
+       interval pointer and Lisp_Object; add new bitfield to use as
+       discriminant.  Change other flag fields to bitfields.
+       (CHECK): New macro for consistency checking.  If ENABLE_CHECKING
+       is defined and the supplied test fails, print a message and
+       abort.
+       (eassert): New macro.  Use CHECK to provide an assert-like
+       facility.
+
+       * intervals.h (NULL_INTERVAL_P): Now applies only to real interval
+       pointers; abort if the value looks like a lisp object.
+       (NULL_INTERVAL_P, NULL_PARENT, HAS_PARENT, HAS_OBJECT, SET_PARENT,
+       SET_OBJECT, INTERVAL_PARENT, GET_INTERVAL_OBJECT, COPY_PARENT):
+       Modify for new interval parent definition.
+
+       * alloc.c (mark_interval_tree, MARK_INTERVAL_TREE,
+       UNMARK_BALANCE_INTERVALS): Update references that need an
+       addressable lisp object in the interval structure.
+       (die): New function.
+       (suppress_checking): New variable.
+
+       * intervals.c (interval_start_pos): Just return 0 if there's no
+       parent object.
+
+2000-03-29  Gerd Moellmann  <gerd@gnu.org>
+
+       * lread.c (read1): Accept `.' (period) as symbol start like in CL
+       and earlier Emacs versions.
+
+       * keyboard.c (Ftop_level): Cancel busy-cursor.
+
+       * eval.c (call_debugger): Cancel busy-cursor.
+
+2000-03-29  Kenichi Handa  <handa@etl.go.jp>
+
+       * search.c (Freplace_match): Adjust multibyteness of the current
+       buffer and NEWTEXT.  Free allocated memory before signaling an
+       error.
+
+2000-03-28  Stefan Monnier  <monnier@cs.yale.edu>
+
+       * regex.c (analyse_first): New function obtained by ripping out most
+       of re_compile_fastmap and generalizing it a little bit so that it
+       can also just return whether a given (sub)pattern can match the empty
+       string or not.
+       (regex_compile): Use `analyse_first' to decide whether the loop-check
+       needs to be done or not for *, +, *? and +? (the loop check is costly
+       for non-greedy repetition).
+       (re_compile_fastmap): Delegate the actual work to `analyse_first'.
+
+2000-03-28  Dave Love  <fx@gnu.org>
+
+       * s/gnu-linux.h (GC_SETJMP_WORKS): Define for i386, sparc, m68k,
+       alpha.
+
+       * alloc.c: Include stdio.h.  Test STDC_HEADERS, not __STDC__.
+
+2000-03-27  Stefan Monnier  <monnier@cs.yale.edu>
+
+       * regex.c (REGEX_FREE_STACK, RESET_FAIL_STACK): Make them usable as
+       an expression.
+       (enum re_opcode_t): Update description of succeed_n.
+       (PATFETCH): Always define.
+       (regex_compile): Use lookahead rather than PATUNFETCH (for repetition
+       operators, char classes, shy-groups and intervals).
+       Optimize special cases of intervals so as to only use succeed_n and
+       jump_n when really needed.
+       (re_compile_fastmap): Simplify handling of jump_n and succeed_n now
+       that we don't have to handle the special cases any more.
+       Simplify on_failure_jump handling as well.
+
+2000-03-28  Jason Rumney  <jasonr@gnu.org>
+
+       * lread.c (Fload): Move safe_p definition to above #ifdef DOS_NT.
+
+2000-03-27  Gerd Moellmann  <gerd@gnu.org>
+
+       * s/freebsd.h (GC_SETJMP_WORKS): Define.
+
+       * s/msdos.h (GC_SETJMP_WORKS): Define.
+       
+       * alloc.c (mark_maybe_object): New function.
+       (mark_memory): Use it.
+       (SETJMP_WILL_LIKELY_WORK, SETJMP_WILL_NOT_WORK): New macros.
+       (setjmp_tested_p, longjmp_done): New variables.
+       (test_setjmp): New function.
+       (mark_stack) [!GC_SETJMP_WORKS]: Call test_setjmp.
+       (init_alloc): Initialize setjmp_tested_p and longjmp_done.
+
+       * xdisp.c (face_before_or_after_it_pos): Pass multibyteness
+       to DEC_TEXT_POS and INC_TEXT_POS.
+
+       * dispnew.c (direct_output_for_insert): Use DEC_TEXT_POS
+       with parameter MULTIBYTE_P.
+
+       * dispextern.h (INC_TEXT_POS, DEC_TEXT_POS): Add parameter 
+       MULTIBYTE_P.
+
+       * editfns.c (Fsubst_char_in_region): Don't use INC_POS in unibyte
+       buffers because it looks for multibyte character byte sequences
+       which don't exist in unibyte text.
+
+       * xterm.h (x_specified_cursor_type, x_copy_color): Add prototypes.
+
+       * xfaces.c (register_color, unregister_color, unregister_colors)
+       [DEBUG_X_COLORS]: New functions.
+       (x_free_colors) [DEBUG_X_COLORS]: Unregister colors.
+
+       * xfns.c (x_set_cursor_color): Get color reference counts right.
+
+       * xterm.c (x_copy_color): New function.
+       (x_alloc_nearest_color) [DEBUG_X_COLORS]: Call register_color.
+
+       * buffer.h (MAX_PER_BUFFER_VARS): Renamed from MAX_BUFFER_LOCAL_VARS.
+       (PER_BUFFER_VAR_OFFSET): Renamed from BUFFER_LOCAL_VAR_OFFSET.
+       (PER_BUFFER_VAR_IDX): Renamed from BUFFER_LOCAL_VAR_IDX.
+       (PER_BUFFER_VALUE_P): Renamed from BUFFER_HAS_LOCAL_VALUE_P.
+       (SET_PER_BUFFER_VALUE_P): Renamed from SET_BUFFER_HAS_LOCAL_VALUE_P.
+       (PER_BUFFER_IDX): Renamed from BUFFER_LOCAL_IDX.
+       (PER_BUFFER_DEFAULT): Renamed from BUFFER_LOCAL_DEFAULT_VALUE.
+       (PER_BUFFER_VALUE): Renamed from BUFFER_LOCAL_VALUE.
+       (PER_BUFFER_SYMBOL): Renamed from BUFFER_LOCAL_SYMBOL.
+       (PER_BUFFER_TYPE): Renamed from BUFFER_LOCAL_TYPE.
+
+       * category.c, data.c, syntax.c, print.c, lread.c: Use new macro
+       names for handling per-buffer variables.
+
+       * buffer.c (buffer_permanent_local_flags): Use MAX_PER_BUFFER_VARS
+       instead of MAX_BUFFER_LOCAL_VARS.
+       (last_per_buffer_idx): Renamed from max_buffer_local_idx.
+
+       * xfaces.c (lookup_face): Don't assert FACE_SUITABLE_FOR_CHAR_P.
+
+       * xfns.c (x_specified_cursor_type): New function.
+       (x_set_cursor_type): Use it.
+
+       * buffer.h (struct buffer): Add cursor_type.
+
+2000-03-26  Stefan Monnier  <monnier@cs.yale.edu>
+
+       * regex.c (enum re_opcode_t): New opcode on_failure_jump_nastyloop.
+       (print_partial_compiled_pattern, re_compile_fastmap): Handle new 
+       opcode.
+       (regex_compile): Use on_failure_jump_nastyloop for non-greedy loops.
+       (re_match_2_internal): Add code for on_failure_jump_nastyloop when
+       executing it as well as when popping it off the stack to find infinite
+       loops in non-greedy repetition operators.
+
+2000-03-26  Gerd Moellmann  <gerd@gnu.org>
+
+       * doc.c (Qfunction_documentation): New variable.
+       (syms_of_doc): Initialize Qfunction_documentation.
+       (Fdocumentation): If FUNCTION is a symbol with non-nil
+       `function-documentation' property, return a documentation derived
+       from that.
+
+       * buffer.c (syms_of_buffer): Add default-cursor-type.
+       (init_buffer_once): Don't let cursor_type have a local value
+       in every buffer.
+
+       * xterm.c (x_display_and_set_cursor): Choose cursor depending
+       on buffer-local value of cursor_type.
+       (x_draw_bar_cursor): Add parameter WIDTH.
+
+       * buffer.c (reset_buffer): Initialize buffer's cursor_type.
+       (init_buffer_once): Set default cursor_type value to t.
+       Mark cursor_type as local everywhere.
+       (syms_of_buffer): New per-buffer variable cursor-type.
+
+       * buffer.h (struct buffer): Remove member local_var_flags,
+       add local_flags.
+       (MAX_BUFFER_LOCAL_VARS): New macro.
+       (BUFFER_LOCAL_VAR_OFFSET, BUFFER_LOCAL_VAR_IDX)
+       (BUFFER_HAS_LOCAL_VALUE_P, SET_BUFFER_HAS_LOCAL_VALUE_P)
+       (BUFFER_LOCAL_IDX, BUFFER_LOCAL_DEFAULT_VALUE, BUFFER_LOCAL_VALUE)
+       (BUFFER_LOCAL_SYMBOL, BUFFER_LOCAL_TYPE): New macros.
+
+       * print.c (print_object): Use new macros for per-buffer
+       variables.
+
+       * category.c (Fset_category_table): Use new macros for per-buffer
+       variables.
+
+       * buffer.c (buffer_permanent_local_flags): Make a char array.
+       (max_buffer_local_idx): New variable.
+       (reset_buffer_local_variables, Fbuffer_local_variables): Rewritten
+       for new handling of per-buffer variables.
+       (buffer_slot_type_mismatch): Use new macros for per-buffer vars.
+       (init_buffer_once): Initialize per-buffer vars differently.
+       Set max_buffer_local_idx.
+
+       * syntax.c (Fset_syntax_table): Use new macros for per-buffer
+       variables.
+
+       * lread.c (defvar_per_buffer): Use new macros for per-buffer
+       variables.
+
+       * data.c (do_symval_forwarding, store_symval_forwarding)
+       (find_symbol_value, set_internal, default_value, Fset_default)
+       (Fkill_local_variable, Flocal_variable_p): Use new macros for
+       per-buffer variables.
+
+       * Makefile.in (bootstrap-emacs): Use `mv -f' instead of `mv'.
+
+2000-03-24  Gerd Moellmann  <gerd@gnu.org>
+
+       * xterm.c (x_term_init): Unblock input around call1 of
+       Qvendor_specific_keysyms.
+
+       * syntax.c (open_paren_in_column_0_is_defun_start): New variable.
+       (find_defun_start): Consider an open parenthesis in column 0
+       a defun start only if open_paren_in_column_0_is_defun_start is set.
+       (syms_of_syntax): New variable open-paren-in-column-0-is-defun-start.
+
+2000-03-24  Stefan Monnier  <monnier@cs.yale.edu>
+
+       * eval.c (Fautoload): Add entry in load-history (if after dump).
+       * lread.c (load-history): Update docstring.
+
+2000-03-24  Gerd Moellmann  <gerd@gnu.org>
+
+       * indent.c (Fvertical_motion): Always use the current buffer.
+       Temporarily change the window's buffer, if necessary.
+
+2000-03-23  Gerd Moellmann  <gerd@gnu.org>
+
+       * xterm.c (fast_find_position): Make sure not to consider rows
+       not visible in the window.
+
+2000-03-22  Stefan Monnier  <monnier@cs.yale.edu>
+
+       * regex.c (enum syntaxcode): Provide default for non-Emacs.
+       (re_compile_fastmap, re_match_2_internal): Undo Dave's previous fix.
+
+2000-03-22  Jason Rumney  <jasonr@gnu.org>
+
+       * w32menu.c (single_submenu): Set help string to NULL if none.
+       (w32_menu_show): Set help string correctly.
+       (add-menu-item): Set help string in MIIM_DATA for menu item.
+       Load SetMenuItemInfoA explicitly.
+       (w32_menu_display_help): New function.
+       
+       * w32fns.c (w32_wnd_proc): Handle WM_MENUSELECT message.
+       (QCdata): Moved to xdisp.c.
+
+       * w32term.c (w32_read_socket): Handle WM_MENUSELECT message.
+       (Vw32_charset_to_codepage_alist): Removed.
+       (Vw32_charset_info_alist): New variable.
+       (Qw32_charset_[ansi, default, symbol, shiftjis, hangul, gb2312,
+       chinesebig5, oem, easteurope, turkish, baltic, russian, arabic,
+       greek, hebrew, thai, johab, mac, unicode]): New symbols.
+       (x_produce_glyphs): Remove out of date #ifdef 0'd section. Replace
+       with TODO comment.
+       (w32_codepage_for_font): Use Vw32_charset_info_alist.
+       (syms_of_w32term): Remove Vw32_charset_to_codepage_alist.
+       Define Vw32_charset_info_alist and w32_charset symbols.
+
+2000-03-22  Jason Rumney  <jasonr@gnu.org>
+
+       * makefile.nt (w32bdf.obj): Update dependencies.
+
+       * w32bdf.c: Include frame.h and dispextern.h before fontset.h.
+
+       * w32fns.c: Include fontset.h after dispextern.h.
+       (Fx_create_frame): Do not create fontset.
+       (w32_load_system_font): Doc fix.
+       (Fx_close_connection): Free full_name if it is not shared.
+
+       * w32term.c: Include fontset.h after dispextern.h.
+       (x_get_glyph_face_and_encoding): New parameter two_byte_p. Callers
+       updated.
+       (w32_per_char_metric): If PCM is invalid, delete and return NULL.
+       (x_get_char_and_face_encoding): Use FACE_FOR_CHAR to get face_id.
+       (w32_font_is_double_byte): New function, needs body.
+       (x_append_glyph): Set glyph->glyph_not_available_p.
+       (x_produce_glyphs): Set it->glyph_not_available_p.  Don't set
+       it->charset.  If it->multibyte_p is zero and it->c is a multibyte
+       character, convert it to a unibyte character.
+       (struct glyph_string): Delete member `charset'.
+       (W32_TEXTOUT): Temporarily remove charset_dim until another way of
+       calculating it is found.
+       (x_set_mouse_face_gc): Call FACE_FOR_CHAR to get face_id.  Handle
+       the case that per char metric is not available correctly.
+       (x_fill_glyph_string): Handle the case that the specific glyph is
+       not available correctly.
+       (BUILD_CHAR_GLYPH_STRINGS): Don't set s->charset.
+       (BUILD_COMPOSITE_GLYPH_STRING): Likewise.
+       (x_new_font): Call FS_LOAD_FONT, not fs_load_font.
+       (x_new_fontset): Call fontset_ascii to get ASCII font name of the
+       fontset.  Don't call FS_LOAD_FONT.
+
+2000-03-22  Ken Raeburn  <raeburn@gnu.org>
+
+       * intervals.h (NULL_INTERVAL): Cast to INTERVAL type.
+       (INT_LISPLIKE): New macro.
+       (NULL_INTERVAL_P): Use it.
+       (INTERVAL_HAS_PARENT, INTERVAL_HAS_OBJECT, SET_INTERVAL_PARENT,
+       SET_INTERVAL_OBJECT, INTERVAL_PARENT, COPY_INTERVAL_PARENT,
+       GET_INTERVAL_OBJECT, INTERVAL_PARENT_OR_NULL): New macros.
+
+       * alloc.c (make_interval, gc_sweep): Use new macros; eliminate all
+       explicit references to "parent" field of struct interval and
+       associated unclean type conversions.
+       * intervals.c (create_root_interval, root_interval, rotate_right,
+       rotate_left, balance_possible_root_interval, split_interval_right,
+       split_interval_left, interval_start_pos, find_interval,
+       next_interval, previous_interval, update_interval,
+       adjust_intervals_for_insertion, delete_node, delete_interval,
+       adjust_intervals_for_deletion, merge_interval_right,
+       merge_interval_left, reproduce_tree, graft_intervals_into_buffer,
+       copy_intervals_to_string): Likewise.
+       * intervals.h (AM_LEFT_CHILD, AM_RIGHT_CHILD, RESET_INTERVAL):
+       Likewise.
+       * syntax.c (update_syntax_table): Likewise.
+
+       * intervals.c (reproduce_tree_obj): New function, like
+       reproduce_tree but takes a Lisp_Object for the parent.  Declare
+       with prototype.
+       (graft_intervals_into_buffer): Use it when appropriate.
+       (reproduce_tree): Declare with prototype.
+       (balance_possible_root_interval): Check that the parent is a lisp
+       object before trying to examine its type.
+
+2000-03-22  Gerd Moellmann  <gerd@gnu.org>
+
+       * xfaces.c (lface_same_font_attributes_p): Compare font attributes
+       as strings only if both are known to be strings.
+
+       * s/openbsd.h (LIBS_TERMCAP): Undef.
+
+2000-03-21  Stefan Monnier  <monnier@cs.yale.edu>
+
+       * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE): Add default
+       definitions for non-Emacs compilation.
+       (enum re_opcode_t): Remove (not)wordchar and move (not)syntaxspec
+       outside of `#ifdef emacs'.
+       (print_partial_compiled_pattern): Update.
+       (regex_compile): Use (not)syntaxspec(Sword) instead of (not)wordchar.
+       (re_compile_fastmap): Merge handling of charset and charset_not (for
+       emacs and non-emacs compilation as well).
+       Similarly for (not)categoryspec and (not)syntaxspec.
+       Don't use the fastmap when reaching `anychar' since the added
+       complexity is not justified.
+       (re_match_2_internal): Merge (not)wordchar (emacs and non-emacs)
+       and (not)syntaxspec.  Merge (not)categoryspec.
+
+2000-03-22  Kenichi Handa  <handa@etl.go.jp>
+
+       * dispextern.h [!HAVE_WINDOW_SYSTEM] (FACE_SUITABLE_FOR_CHAR_P,
+       FACE_FOR_CHAR): Define them differently for the configuration of
+       --without-x.
+
+2000-03-21  Dave Love  <fx@gnu.org>
+
+       * fontset.c (Fset_fontset_font, Ffontset_font): Fix newlines in
+       doc string.
+
+2000-03-21  Gerd Moellmann  <gerd@gnu.org>
+
+       * xfaces.c (check_lface_attrs) [GLYPH_DEBUG]: Fix syntax error.
+       (lface_fully_specified_p): Don't check contents of
+       LFACE_FONT_INDEX because that attribute is optional.
+       (realize_x_face): Remove now unwarranted xassert.
+
+2000-03-21  Kenichi HANDA  <handa@etl.go.jp>
+
+       The following changes are to make font selection based on
+       characters, not charset.  In addition, they recover fontset
+       facilities while utilizing the new font selection mechanism.
+
+       * Makefile.in (fontset.o): Depend on dispextern.h.
+
+       * alloc.c (mark_face_cache): Don't mark face->registry.
+
+       * dispextern.h (struct glyph): New member glyph_not_available_p.
+       Use 22 bits for face_id.
+       (enum lface_attribute_index): Add LFACE_FONT_INDEX.
+       (struct face): Delete member registry, new member ascii_face.
+       (FACE_SUITABLE_FOR_CHAR_P): Renamed from
+       FACE_SUITABLE_FOR_CHARSET_P.  Caller changed.
+       (FACE_FOR_CHAR): Renamed from FACE_FOR_CHARSET.  Caller changed.
+       (struct it): Delete member charset, new member
+       glyph_not_available_p.
+
+       * fontset.h (FONT_NOT_OPENED, FONT_NOT_FOUND): Macros removed.
+       (struct fontset_info, struct fontset_data): Structs removed.
+       (allloc_fontset_data, free_fontset_data, fs_regiser_fontset,
+       Vglobale_fontset_alist, font_idx_temp): Externs removed.
+       (fs_load_font, fs_query_fontset): Adjusted for new argument.
+       (fs_free_face_fontset, fontset_font_pattern,
+       face_suitable_for_char_p, face_for_char,
+       make_fontset_for_ascii_face): Extern them.
+       (FS_LOAD_FONT): Adjusted for the change of fontset implementation.
+       (FS_LOAD_FACE_FONT): New macro.
+
+       * fontset.c: All codes rewritten or adjusted for the change of
+       fontset implementation.  Now fontset is represented by char table.
+       (Vglobal_fontset_alist, font_idx_temp, my_strcasetbl): Variables
+       removed.
+       (my_strcasecmp): Function removed.
+       (Vfontset_table, next_fontset_id, Vdefault_fontset): New
+       variables.
+       (AREF, ASIZE): New macros.
+       (FONTSET_FROM_ID, FONTSET_ID, FONTSET_NAME, FONTSET_FRAME,
+       FONTSET_ASCII, FONTSET_BASE, BASE_FONTSET_P, FONTSET_REF,
+       FONTSET_REF_VIA_BASE, FONTSET_SET): New macros.
+       (fontset_ref, fontset_ref_via_base, fontset_set, make_fontset,
+       fontset_id_valid_p, font_family_registry, fontset_name,
+       fontset_ascii, free_face_fontset, face_suitable_for_char_p,
+       face_for_char, make_fontset_for_ascii_face, fontset_font_pattern):
+       New functions.
+       (fs_load_font): New arg FACE.  Caller changed.
+       (fs_query_fontset): Argument changed.  Caller changed.
+       (Fquery_fontset): call fs_query_fontset.
+       (fs_register_fontset, alloc_fontset_data, free_fontset_data):
+       Functions removed.
+       (clear_fontset_elements, check_registry_encoding,
+       check_fontset_name): New functions.
+       (syms_of_fontset): Set char-table-extra-slots property of fontset
+       to 3.  Staticpro and initialize Vfontset_table and
+       Vdefault_fontset.  Defsubr fontset_font and fontset_list.
+
+       * frame.h (struct frame): Member `fontset_data' removed.
+       (FRAME_FONTSET_DATA): Macro removed.
+
+       * frame.c (make_frame): Don't allocate f->fontset_data.
+       (Fdelete_frame): Don't free f->fontset_data.
+
+       * msdos.c (XMenuActivate): Args to lookup_derived_face changed.
+
+       * xdisp.c (charset_at_position): Function removed.
+       (init_iterator): Don't set member charset of struct `it'.
+       (handle_face_prop, reseat_to_string, set_iterator_to_next,
+       next_element_from_display_vector, insert_left_trunc_glyphs):
+       Likewise.
+       (face_before_or_after_it_pos): Call FACE_FOR_CHAR, not
+       FACE_FOR_CHARSET.
+       (get_next_display_element, append_space,
+       extend_face_to_end_of_line): Likewise.
+
+       * xfaces.c (Qx_charset_registry, Vface_default_registry):
+       Variables removed.
+       (clear_font_table, frame_update_line_height, load_face_font):
+       Adjusted for the change of fontset implementation.
+       (load_face_fontset_font): Function removed.
+       (pixel_point_size): New function.
+       (font_list): Argument type changed.  Caller changed.
+       (LFACE_FONT): New macro.
+       (check_lface_attrs): Check attr[LFACE_FONT_INDEX].
+       (set_lface_from_font_name): Type of arg FONTNAME is changed to
+       Lisp_Object.  Determine the font name by actually loading a font
+       by the specified pattern.  Set LFACE_FONT (lface) to the specified
+       pattern.  Even if a font is not found, don't try alternatives.
+       (Finternal_set_lisp_face_attribute): Handle `font' slot in lface.
+       (set_font_frame_param): If `font' is specified in lface, use it.
+       (Finternal_get_lisp_face_attribute): Handle `font' slot in lface.
+       (lface_same_font_attributes_p): Likewise.
+       (make_realized_face): Arguent changed.  Caller changed.  Set
+       face->ascii_face to face itself.
+       (free_realized_face): Free face->fontset if face is for ASCII.
+       (face_suitable_for_iso8859_1_p, face_suitable_for_charset_p,
+       deduce_unibyte_registry, x_charset_registry): Functions removed.
+       (free_realized_multibyte_face): New function.
+       (lookup_face, lookup_named_face, lookup_derived_face): Argument
+       changed.  Caller changed.
+       (try_font_list): Argument type changed.
+       (face_fontset): Check `font' slot of ATTRS, not `family' slot.
+       (choose_face_font): Argument changed.  Handle fontset properly.
+       (choose_face_fontset_font): Function removed.
+       (realize_default_face, realize_named_face): Don't remove the
+       former face here.
+       (realize_face): Argument changed.  Caller changed.  Remove face
+       with the arg former_face_id in advance.  Load font for the new
+       face.
+       (realize_x_face): Argument changed.  Caller changed.  For a
+       multibyte character, share fontset with base_face.  For a single
+       byte character, make a new realized fontset.  Don't load a font
+       here.
+       (realize_tty_face): Argument changed.  Caller changed.
+       (compute_char_face): Call FACE_FOR_CHAR, not FACE_FOR_CHARSET.
+       (face_at_buffer_position): Don't check multibyte_p for returning
+       DEFAULT_FACE_ID.
+       (face_at_string_position): Call FACE_SUITABLE_FOR_CHAR_P, not
+       FACE_SUITABLE_FOR_CHARSET_P.
+       (syms_of_xfaces): Remove code for Qx_charset_registry and
+       Vface_default_registry.
+
+       * xterm.c: Include fontset.h after dispextern.h.  Undo the changes
+       related to PER_CHAR_METRIC done by Gerd on 2000-03-03.
+       (x_per_char_metric): Don't try FONT->default_char.  Even if
+       pcm->width is zero, glyph bits may exist.
+       (x_encode_char): Always initialize char2b->byte1.
+       (x_get_char_face_and_encoding): Call FACE_FOR_CHAR to get face_id.
+       (x_get_glyph_face_and_encoding): New arg two_byte_p.  Caller
+       changed.
+       (x_append_glyph): Set glyph->glyph_not_available_p.
+       (x_produce_glyphs): Set it->glyph_not_available_p.  Don't set
+       it->charset.  Handle the case that per char metric is not
+       available.  If it->multibyte_p is zero and it->c is a multibyte
+       character, convert it to a unibyte character.
+       (struct glyph_string): Delete member `charset'.
+       (x_set_mouse_face_gc): Call FACE_FOR_CHAR to get face_id.  Handle
+       the case that per char metric is not available correctly.
+       (x_fill_glyph_string): Handle the case that the specific glyph is
+       not available correctly.
+       (BUILD_CHAR_GLYPH_STRINGS): Don't set s->charset.
+       (BUILD_COMPOSITE_GLYPH_STRING): Likewise.
+       (x_new_font): Call FS_LOAD_FONT, not fs_load_font.
+       (x_new_fontset): Call fontset_ascii to get ASCII font name of the
+       fontset.  Don't call FS_LOAD_FONT.
+
+       * xfns.c (Fx_create_frame): Don't cal fs_register_fontset.
+       (x_create_tip_frame): Likewise.
+       (Fx_close_connection): Free full_name of font_info.
+
+       * fns.c (optimize_sub_char_table): New function.
+       (Foptimize_char_table): New function.
+       (syms_of_fns): Defsubr Soptimize_char_table.
+
+2000-03-20  Gerd Moellmann  <gerd@gnu.org>
+
+       * buffer.c (Fset_buffer_modified_p): Set update_mode_lines
+       only if buffer is displayed in some window.
+
+       * xdisp.c (handle_single_display_prop): Initialize local `value'.
+       (try_window_reusing_current_matrix): Don't call scroll run
+       function if run's current and desired position are the same;
+       this prevents cursor flickering.
+
+2000-03-19  Stefan Monnier  <monnier@cs.yale.edu>
+
+       * regex.h (RE_TRANSLATE. RE_TRANSLATE_P): Moved to regex.c.
+
+       * regex.c (RE_STRING_CHAR): New macro.
+       (GET_CHAR_AFER_2): Remove.
+       (RE_TRANSLATE, RE_TRANSLATE_P): New macros moved from regex.h.
+       (enum re_opcode_t): Remove on_failure_jump_exclusive.
+       (print_partial_compiled_pattern, re_compile_fastmap)
+       (re_match_2_internal): Remove on_failure_jump_exclusive.
+       (regex_compile): Turn optimizable P+ loops into PP*, so that the
+       optimization only need to work for * (ie. can use of_keep_string_jump).
+       Remove the special case for .*\n since it is now covered by the general
+       optimization.
+       (re_search_2): Don't bother with `room'.
+       (skip_one_char): New function.
+       (skip_noops): Simplify since `memory' is not needed any more.
+       (mutually_exclusive_p): Restructure slightly to use `switch' and
+       add handling for "all" remaining cases.
+       (re_match_2_internal): Change on_failure_jump_smart to use
+       on_failure_keep_string_jump (and redirect the end-of-loop jump)
+       rather than on_failure_jump_exclusive.
+
+2000-03-19  Gerd Moellmann  <gerd@gnu.org>
+
+       * xfns.c (select_visual): Don't set dpyinfo->n_planes to the
+       number of bits per RGB because it's everywhere used as the depth
+       of the visual.
+
+       * term.c (calculate_costs): Remove code dealing with X frames.
+
+2000-03-19  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
+
+       * lread.c (syms_of_lread): Doc fix for load-convert-to-unibyte.
+
 2000-03-18  Gerd Moellmann  <gerd@gnu.org>
 
        * lread.c (read_integer): Unread the last char not consumed.