1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-05 11:21:04 -08:00
Commit graph

11151 commits

Author SHA1 Message Date
Ken Raeburn
cc2d8c6b3d * 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.
2000-04-02 01:52:58 +00:00
Gerd Moellmann
27660e89c5 *** empty log message *** 2000-04-01 13:39:21 +00:00
Gerd Moellmann
4e6ba4a490 (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 13:33:12 +00:00
Ken Raeburn
6fc556fdb4 Fix Lisp_Object/int type confusion revealed by making Lisp_Object a union type:
* 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 12:59:53 +00:00
Ken Raeburn
3578db3c16 * 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.
2000-04-01 12:39:03 +00:00
Gerd Moellmann
610d841ea4 *** empty log message *** 2000-04-01 12:25:00 +00:00
Gerd Moellmann
17e8204bae (realize_basic_faces): Block input while realizing
the faces.
2000-04-01 12:23:25 +00:00
Gerd Moellmann
6e7b24574b (lispy_mouse_names): Add additional mouse names. 2000-04-01 11:50:58 +00:00
Gerd Moellmann
218b0fd57b (NUM_MOUSE_BUTTONS): Increase to 15. 2000-04-01 11:48:59 +00:00
Gerd Moellmann
aa110c0c9e *** empty log message *** 2000-03-31 11:54:40 +00:00
Gerd Moellmann
474848acee (x_produce_glyphs): When displaying unibyte text
or ASCII, handle case that per-char metric is NULL.
2000-03-31 11:52:58 +00:00
Ken Raeburn
c6129d7e86 * lisp.h (NO_UNION_TYPE) [ENABLE_CHECKING]: Undef. 2000-03-30 22:27:55 +00:00
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