(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.
(store_symval_forwarding, swap_in_symval_forwarding)
(set_internal, default_value, Fset_default, Fmake_local_variable)
(Fmake_variable_buffer_local, Fkill_local_variable):
Handle new data structure for struct Lisp_Buffer_Local_Value.
(Fmake_variable_frame_local): New function.
Kenichi Handa [Thu, 12 Mar 1998 00:42:35 +0000 (00:42 +0000)]
(adjust_before_replace): Call
adjust_overlays_for_delete.
(adjust_after_replace): Delete args COMBINED_BEFORE_BYTES and
COMBINED_AFTER_BYTES. This makes the newly generated text
following GPT_ADDR a buffer contents.
Kenichi Handa [Thu, 12 Mar 1998 00:38:28 +0000 (00:38 +0000)]
(Finsert_file_contents): Don't do position adjustments
and handling post-read-conversion here, they are done in
code_convert_region. Even if a file is read by no-conversion,
call adjust_after_replace to adjust positions.
(combine_bytes): New function.
(insert_1_both, insert_from_string_1, insert_from_buffer_1):
Simplify greatly by using combine_bytes near the end
to handle all aspects of combining except for undo-recording.
This means most of the code deals with the text as if there were
no combining.
(replace_range): Likewise. Also handle unibyte-multibyte conversion
as in insert_from_string_1.
(del_range_2): Handle combining of character before the deletion
with strays after the deletion.
(adjust_markers_for_delete): Delete debugging code for Z == Z_BYTE.
(adjust_markers_for_insert): Move Z == Z_BYTE debugging code
to before we relocate the marker.
(adjust_markers_for_insert): Don't leave a marker within
the combined_after_bytes. Use DEC than INC when leaving
a marker before the insertion.
(count_combining_before): Return number of bytes from start
of insertion that will combine.
(insert_1_both): Compensate for change in count_combining_before.
Delete intervals for the combined_after_bytes.
Compensate for that when updating other intervals.
(insert_from_buffer_1, replace_range): Likewise.
(adjust_after_replace): Likewise.
(insert_from_string_1): Likewise. Also handle intervals
for inserting just part of string.
(insert_1_both, insert_from_string_1, insert_from_buffer_1):
Count all of combined_after_bytes, not just 1, when correcting
nchars, and in related places.
(adjust_after_replace, replace_range): Likewise.
Dave Love [Tue, 10 Mar 1998 22:51:23 +0000 (22:51 +0000)]
(scheme-mode-variables): Set font-lock-defaults locally.
(scheme-font-lock-keywords-1, scheme-font-lock-keywords-2,
scheme-font-lock-keywords): Moved here from font-lock.el.
(dsssl-mode): Move font-lock-defaults setting and running hooks.
(hippie-expand-dabbrev-skip-space): Renamed `he-dabbrev-skip-space'.
(hippie-expand-dabbrev-as-symbol): Renamed `he-dabbrev-as-symbol'.
(hippie-expand-no-restriction): New variable.
(hippie-expand-only-buffers): New variable.
(he-init-string,he-line-search,he-list-search,he-dabbrev-search): Use
`buffer-substring-no-properties' to avoid transfer of text properties.
(he-dabbrev-kill-search,he-whole-kill-search): Remove text properties
from search result.
(he-regexp-member): Removed function.
(he-buffer-member): New function used instead of `he-regexp-member'.
(try-expand-line,try-expand-line-all-buffers,try-expand-list,
try-expand-list-all-buffers,try-expand-dabbrev,
try-expand-dabbrev-all-buffers): Depending on
`hippie-expand-no-restriction', widen the buffer before search.
(try-expand-line-all-buffers,try-expand-list-all-buffers,
try-expand-dabbrev-all-buffers): Use `he-buffer-member' and
`hippie-expand-only-buffers'.
(adjust_markers_for_insert):
New args COMBINED_AFTER_BYTES, COMBINED_BEFORE_BYTES. Calls changed.
(insert_1): Call insert_1_both.
(count_combining_before): New function.
(count_combining_after): New function.
(insert_1_both, insert_from_string_1): Handle bytes that combine
with chars adjacent to the inserted text.
(insert_from_buffer_1, replace_range): Likewise.
(adjust_after_replace): New args COMBINED_BEFORE_BYTES, COMBINED_AFTER_BYTES.
(winner-mode, winner-save-unconditionally)
(winner-hook-installed-p): Save window configuration after
every command if window-configuration-change-hook is not present.
(winner-save-new-configurations, winner-insert-if-new):
Compare a new window configuration
with the previous configuration before saving it.
(winner-insert-if-new, winner-ring)
(winner-configuration, winner-set): Save buffer list together
with the window configurations, so that windows that can no
longer be correctly restored can instead be deleted.
(winner-undo): Compare restored configuration
with other configurations that have been reviewed and skip
this one if it looks similar.
(winner-insert-if-new, winner-save-new-configurations)
(winner-save-unconditionally): Just save the final
configuration if the same command (changing the window
configuration) is applied several times in a row.
(winner-switch): Removed the command
`winner-switch' (and the variables connected to it), since
because of the change above, any "switching package" may now
be used without disturbing winner-mode too much.
(winner-change-fun): Removed the pushnew
command, so that `cl' will not have to be loaded.
(winner-set-conf): Introduced "wrapper" around
`set-window-configuration', so that `winner-undo' may be
called from the minibuffer.
(latex-mode): Set fill-nobreak-predicate.
(slitex-mode): Set fill-nobreak-predicate, tex-face-alist,
and imenu-create-index-function.
(latex-fill-nobreak-predicate): New function.
(simple_search): Don't count a character until it matches!
Call set_search_regs differently in a forward search.
(boyer_moore): Fix up the code that translates the pattern
and loops thru equivalent characters.