1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 07:41:28 -08:00
Commit graph

11139 commits

Author SHA1 Message Date
Ken Raeburn
8801a864d2 * 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 09:56:31 +00:00
Gerd Moellmann
8e7af858e1 (xstrdup): Add prototype. 2000-03-30 09:36:27 +00:00
Gerd Moellmann
58f2fab8c4 (realize_tty_face): Use find_symbol_value instead
of Fsymbol_value.
(xstrdup): Moved to alloc.c.
2000-03-30 09:32:14 +00:00
Gerd Moellmann
dca7c6a8d2 (xstrdup): Moved here from xfaces.c.
(allocating_for_lisp): Variable removed.
(lisp_malloc): Block input around the calls to malloc and
mem_insert.
2000-03-30 09:29:22 +00:00
Gerd Moellmann
e3130015d6 (free_image_cache): Free the cache structure itself
last, after all its members have been freed.
2000-03-30 09:27:30 +00:00
Kenichi Handa
d2ff77dab1 *** empty log message *** 2000-03-30 01:12:14 +00:00
Kenichi Handa
6702eacee0 Augment the comment of lookup_face. 2000-03-30 00:27:29 +00:00
Ken Raeburn
b96f9fb741 * scroll.c (CHECK_BOUNDS): Renamed from CHECK.
* emacs.c (main): Fix sense of no-loadup test.
2000-03-29 23:24:14 +00:00
Ken Raeburn
e0b8c689e2 Stop assuming interval pointers and lisp objects can be distinguished by
inspection.  Beginnings of support for expensive internal consistency checks.

* 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 22:14:34 +00:00
Gerd Moellmann
f83c5440c7 *** empty log message *** 2000-03-29 13:05:37 +00:00
Gerd Moellmann
2c9cf2c821 (Ftop_level): Cancel busy-cursor. 2000-03-29 12:58:52 +00:00
Gerd Moellmann
03859d20b7 (read1): Accept `.' (period) as symbol start like in CL
and earlier Emacs versions.
2000-03-29 12:57:45 +00:00
Kenichi Handa
3bc25e5289 (Freplace_match): Adjust multibyteness of the current
buffer and NEWTEXT.  Free allocated memory before signaling an
error.
2000-03-29 11:31:23 +00:00
Kenichi Handa
fdce64ff6d *** empty log message *** 2000-03-29 11:29:23 +00:00
Gerd Moellmann
e469e8780c *** empty log message *** 2000-03-29 11:09:14 +00:00
Gerd Moellmann
237c23b00b (call_debugger): Cancel busy-cursor. 2000-03-29 11:04:42 +00:00
Dave Love
3e04fafd11 *** empty log message *** 2000-03-29 10:19:14 +00:00
Stefan Monnier
f6a3f532b0 (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-29 04:01:45 +00:00
Dave Love
bb15bd9a51 (GC_SETJMP_WORKS): Define for i386, sparc, m68k, alpha. 2000-03-28 16:17:31 +00:00
Dave Love
e9b309ac91 Include stdio.h. Test STDC_HEADERS, not __STDC__. 2000-03-28 11:10:55 +00:00
Stefan Monnier
ed0767d80f (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-27 22:26:54 +00:00
Jason Rumney
e11e7e46bc *** empty log message *** 2000-03-27 20:36:15 +00:00
Jason Rumney
456c67a483 (Fload): Move safe_p definition to above #ifdef DOS_NT block. 2000-03-27 20:24:10 +00:00
Jason Rumney
93ff43955c (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-27 20:19:49 +00:00
Gerd Moellmann
11fd416e9f Use new macro names for handling per-buffer variables. 2000-03-27 19:55:38 +00:00
Gerd Moellmann
182ff24225 (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.
2000-03-27 19:43:47 +00:00
Gerd Moellmann
4b3fd71946 (GC_SETJMP_WORKS): Define. 2000-03-27 19:42:03 +00:00
Gerd Moellmann
c1005d06e8 (face_before_or_after_it_pos): Pass multibyteness
to DEC_TEXT_POS and INC_TEXT_POS.
2000-03-27 16:05:50 +00:00
Gerd Moellmann
5f15d71229 (direct_output_for_insert): Use DEC_TEXT_POS
with parameter MULTIBYTE_P.
2000-03-27 16:03:29 +00:00
Gerd Moellmann
7bed37e412 (INC_TEXT_POS, DEC_TEXT_POS): Add parameter MULTIBYTE_P. 2000-03-27 16:02:34 +00:00
Gerd Moellmann
7439e5b9ca (Fsubst_char_in_region): Don't use INC_POS in unibyte
buffers because it looks for multibyte character sequences which
don't exist in unibyte text.
2000-03-27 15:48:36 +00:00
Gerd Moellmann
d9c545daed (x_copy_color): New function.
(x_alloc_nearest_color) [DEBUG_X_COLORS]: Call register_color.
2000-03-27 14:50:47 +00:00
Gerd Moellmann
10168ebbc5 (x_set_cursor_color): Get color reference counts right. 2000-03-27 14:48:33 +00:00
Gerd Moellmann
a435fc2a6d (register_color, unregister_colors, unregister_colors)
[DEBUG_X_COLORS]: New functions.
(x_free_colors) [DEBUG_X_COLORS]: Unregister colors.
2000-03-27 14:47:42 +00:00
Gerd Moellmann
5c14c2b9df (x_specified_cursor_type, x_copy_color): Add prototypes. 2000-03-27 14:46:48 +00:00
Gerd Moellmann
7313acd0d4 (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.
2000-03-27 12:51:06 +00:00
Gerd Moellmann
f6cd05276d Use new macro names
for handling per-buffer variables.
2000-03-27 12:50:13 +00:00
Gerd Moellmann
ddebaaa9da (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.
2000-03-27 12:49:02 +00:00
Gerd Moellmann
c87a1fdaa8 (lookup_face): Don't assert FACE_SUITABLE_FOR_CHAR_P. 2000-03-27 12:17:05 +00:00
Gerd Moellmann
88faab8953 *** empty log message *** 2000-03-27 11:15:20 +00:00
Gerd Moellmann
0d1469d67a (x_specified_cursor_type): New function.
(x_set_cursor_type): Use it.
2000-03-27 11:06:04 +00:00
Stefan Monnier
d80f42b736 *** empty log message *** 2000-03-27 09:51:45 +00:00
Gerd Moellmann
a698b3580e (struct buffer): Add cursor_type. 2000-03-27 09:46:30 +00:00
Stefan Monnier
0683b6fa90 (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 23:05:51 +00:00
Gerd Moellmann
3d4ff2dd8d *** empty log message *** 2000-03-26 19:33:04 +00:00
Gerd Moellmann
9191c8ae4e (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.
2000-03-26 19:32:02 +00:00
Gerd Moellmann
bd96bd79eb (syms_of_buffer): Add default-cursor-type.
(init_buffer_once): Don't let cursor_type have a local value
in every buffer.
2000-03-26 18:45:57 +00:00
Gerd Moellmann
19d1bc27d3 *** empty log message *** 2000-03-26 16:27:11 +00:00
Gerd Moellmann
bb2ec97602 (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.
2000-03-26 16:25:09 +00:00
Gerd Moellmann
f02d8aa0f6 (x_display_and_set_cursor): Choose cursor depending
on buffer-local value of cursor_type.
(x_draw_bar_cursor): Add parameter WIDTH.
2000-03-26 16:24:24 +00:00