(make_specified_string): New function.
(make_string_from_bytes): New function.
(compact_strings): Get byte size from size, if size_byte < 0.
(Fmake_string): Use make_uninit_string for single-byte char.
(make_unibyte_string): Mark string as unibyte.
(make_uninit_string): Likewise.
(make_string): Likewise, if size == size in bytes.
(make_pure_string): New arg MULTIBYTE.
(Fpurecopy): Pass new arg to make_pure_string.
(Fchar_to_string): Use make_string_from_bytes.
(Fformat): Use make_specified_string.
(make_buffer_string_both): Use make_uninit_string if buffer is unibyte.
Don't include puresize.h any more as code that needs it
has moved to keyboard.c.
(menu_item_equiv_key, menu_item_enabled_p_1, menu_item_enabled_p):
Functions deleted; code moved to parse_menu_item in keyboard.c.
(single_keymap_panes): Large part of code moved to single_menu_item.
(single_menu_item): New function that uses parse_menu_item.
(Qmenu_alias): Variable deleted.
(QCtoggle, QCradio): New variables.
(syms_of_xmenu): Change initializations of variables.
(fix_submap_inheritance, get_keyelt, store_in_keymap,
copy-keymap, where_is_internal_1): Support new format for menu items.
(syms_of_keymap): New symbol `menu-item'.
Include puresize.h for CHECK_IMPURE.
(parse_menu_item): New function.
(menu_item_eval_property_1, menu_item_eval_property) New suroutines.
(menu_bar_one_keymap): Moved some code to menu_bar_item.
(menu_bar_item): Rewritten to use parse_menu_item.
(menu_bar_item_1): Function deleted.
(QCenable, QCvisible, QChelp, QCfilter, QCbutton, QCtoggle, QCradio):
(Qmenu_alias): New variables.
(syms_of_keyboard): Initialize them, and item_properties.
(insert_1_both, insert_from_string_1, insert_from_buffer_1):
(adjust_before_replace, adjust_after_replace, replace_range):
(del_range_2): Call record_delete the new way.
Use make_buffer_string_both to make the string to pass.
André Spiegel [Fri, 20 Mar 1998 15:40:24 +0000 (15:40 +0000)]
(vc-next-action-on-file): Properly handle the case when user tries to
check-in, but file on disk has changed.
(vc-do-command): Consider LAST argument only if FILE is non-nil.
(vc-add-triple, vc-record-rename, vc-lookup-file): Find
vc-name-assoc-file based on vc-name of FILE.
(vc-backend-admin, vc-rename-file): Handle the SCCS PROJECTDIR feature.
(vc-do-command): Rewrote doc string.
(reporter-mail): New function.
(reporter-compose-outgoing): Use fboundp, not functionp.
(reporter-bug-hook): Fix error message.
(reporter-beautify-list): Break infloop when reaching the end of the
buffer without crossing an unbalanced paren. Use scan-sexps instead
of forward-sexp for the loop break test.
(reporter-submit-bug-report): Only call
display-buffer if pop-up-windows is non-nil.
(del_range_2): Use adjust_markers_for_record_delete.
(adjust_markers_for_delete): Delete unused local coming_gap_size.
(adjust_markers_for_record_delete): New function.
(insert_1_both, insert_from_string_1, insert_from_buffer_1)
(adjust_after_replace, replace_range):
Use adjust_markers_for_record_delete.
(Fbackward_prefix_chars): Set point properly while scanning.
(scan_sexps_forward): Make INC_FROM do UPDATE_SYNTAX_TABLE_FORWARD.
Delete the explicit calls to UPDATE_SYNTAX_TABLE_FORWARD.
Also set prev_from_syntax (new local var). Test that in the loop,
instead of fetching syntax of the previous char.
Kenichi Handa [Mon, 16 Mar 1998 05:51:07 +0000 (05:51 +0000)]
(ADJUST_CHAR_POS): New macro.
(combine_bytes): Use the macro ADJUST_CHAR_POS.
(adjust_after_replace): New arg REPLACE. If it is zero, give LEN
as the arg LENGTH to offset_intervals.
(del_range_2): Give correct args to count_combining_before and
combine_bytes. Adjust the gap position after record_delete if
necessary. Give character position to adjust_overlays_for_delete.
Kenichi Handa [Mon, 16 Mar 1998 05:51:07 +0000 (05:51 +0000)]
(code_convert_region): The 6th arg name is changed to
REPLACE. Even if there's no need of code conversion, call
adjust_after_replace to handle bytes combining.
(view-return-to-alist): Doc fix.
(view-mode-enter): Doc fix.
(view-mode-exit): Handle new alternative `quit-window'
for OLD-BUF-INFO in RETURN-TO-ALIST.
(insert_1_both, insert_from_string_1, insert_from_buffer_1)
(adjust_after_replace, replace_range):
Account for combining bytes in args to record_insert.
(del_range_2): Make undo records for combining bytes.
Put second call to move_gap_both before setting beg_unchanged.
Customized.
(dirtrack-forward-slash): Renamed from `forward-slash'.
(dirtrack-backward-slash): Renamed from `backward-slash'.
(dirtrack-replace-slash): Renamed from `replace-slash'.
Implement selective undo (by Paul Flinders).
(undo-copy-list, undo-copy-list-1): New functions.
(undo-make-selective-list, undo-delta): New functions.
(undo-elt-in-region, undo-elt-crosses-region): New functions.
(undo-adjusted-markers): New defvar.
(undo-start): New args BEG and END.
(undo): If arg or active region, pass args to undo-start.