From 37b07a46bec9460c511c3ca459e131881183d7d7 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 11 Mar 2010 13:10:11 +0100 Subject: [PATCH] Fix problems caused by the last rebase. --- src/Makefile.in | 12 ++++++------ src/buffer.c | 30 +++++++++++++++--------------- src/buffer.h | 2 +- src/character.c | 1 - src/cmds.c | 2 -- src/composite.c | 6 +++--- src/dbusbind.c | 2 +- src/editfns.c | 2 +- src/eval.c | 5 +++++ src/fileio.c | 6 +++--- src/globals.h | 2 +- src/image.c | 9 --------- src/keyboard.c | 1 + src/lisp.h | 4 ++-- src/menu.h | 2 +- src/search.c | 2 +- src/syntax.h | 2 +- src/thread.c | 2 ++ src/xdisp.c | 7 +++++-- 19 files changed, 49 insertions(+), 50 deletions(-) diff --git a/src/Makefile.in b/src/Makefile.in index ff8c1c47abe..b2f4dc6615c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1126,12 +1126,12 @@ term.o: term.c termchar.h termhooks.h termopts.h lisp.h $(config_h) cm.h frame.h syssignal.h $(INTERVALS_H) buffer.h termcap.o: termcap.c lisp.h $(config_h) terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \ - keyboard.h $(config_h) -terminfo.o: terminfo.c $(config_h) -thread.o: thread.c $(config_h) lisp.h -tparam.o: tparam.c $(config_h) -undo.o: undo.c buffer.h commands.h window.h $(config_h) -unexaix.o: unexaix.c $(config_h) + keyboard.h lisp.h $(config_h) dispextern.h composite.h systime.h +terminfo.o: terminfo.c lisp.h $(config_h) +thread.o: thread.c lisp.h $(config_h) +tparam.o: tparam.c lisp.h $(config_h) +undo.o: undo.c buffer.h commands.h window.h dispextern.h lisp.h $(config_h) +unexaix.o: unexaix.c lisp.h $(config_h) unexalpha.o: unexalpha.c $(config_h) unexcw.o: unexcw.c lisp.h $(config_h) unexec.o: unexec.c lisp.h $(config_h) diff --git a/src/buffer.c b/src/buffer.c index 6f6c0c29ab3..bd5d3e8aeaf 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -415,7 +415,7 @@ b->width_table_ = Qnil; b->mark_ = Fmake_marker (); BUF_MARKERS (b) = NULL; - b->name = name; + b->name_ = name; /* Put this in the alist of all live buffers. */ XSETBUFFER (buffer, b); @@ -700,7 +700,7 @@ reset_buffer (b) /* It is more conservative to start out "changed" than "unchanged". */ b->clip_changed = 0; b->prevent_redisplay_optimizations_p = 1; - b->backed_up = Qnil; + b->backed_up_ = Qnil; BUF_AUTOSAVE_MODIFF (b) = 0; b->auto_save_failure_time = -1; b->auto_save_file_name_ = Qnil; @@ -1550,7 +1550,7 @@ with SIGHUP. */) /* Delete any auto-save file, if we saved it in this session. But not if the buffer is modified. */ - if (STRINGP (b->auto_save_file_name) + if (STRINGP (BUF_AUTO_SAVE_FILE_NAME (b)) && BUF_AUTOSAVE_MODIFF (b) != 0 && BUF_SAVE_MODIFF (b) < BUF_AUTOSAVE_MODIFF (b) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b) @@ -5202,14 +5202,14 @@ init_buffer_once () buffer_defaults.overlays_after = NULL; buffer_defaults.overlay_center = BEG; - XSETFASTINT (buffer_defaults.tab_width, 8); - buffer_defaults.truncate_lines = Qnil; - buffer_defaults.word_wrap = Qnil; - buffer_defaults.ctl_arrow = Qt; - buffer_defaults.direction_reversed = Qnil; - buffer_defaults.cursor_type = Qt; - buffer_defaults.extra_line_spacing = Qnil; - buffer_defaults.cursor_in_non_selected_windows = Qt; + XSETFASTINT (BUF_TAB_WIDTH (&buffer_defaults), 8); + BUF_TRUNCATE_LINES (&buffer_defaults) = Qnil; + BUF_WORD_WRAP (&buffer_defaults) = Qnil; + BUF_CTL_ARROW (&buffer_defaults) = Qt; + BUF_DIRECTION_REVERSED (&buffer_defaults) = Qnil; + BUF_CURSOR_TYPE (&buffer_defaults) = Qt; + BUF_EXTRA_LINE_SPACING (&buffer_defaults) = Qnil; + BUF_CURSOR_IN_NON_SELECTED_WINDOWS (&buffer_defaults) = Qt; #ifdef DOS_NT buffer_defaults.buffer_file_type = Qnil; /* TEXT */ @@ -5758,17 +5758,17 @@ Format with `format-mode-line' to produce a string value. */); doc: /* *Non-nil if searches and matches should ignore case. */); DEFVAR_PER_BUFFER ("fill-column", ¤t_buffer->fill_column_, - make_number (Lisp_Int), + make_number (LISP_INT_TAG), doc: /* *Column beyond which automatic line-wrapping should happen. Interactively, you can set the buffer local value using \\[set-fill-column]. */); DEFVAR_PER_BUFFER ("left-margin", ¤t_buffer->left_margin_, - make_number (Lisp_Int), + make_number (LISP_INT_TAG), doc: /* *Column for the default `indent-line-function' to indent to. Linefeed indents to this column in Fundamental mode. */); DEFVAR_PER_BUFFER ("tab-width", ¤t_buffer->tab_width_, - make_number (Lisp_Int), + make_number (LISP_INT_TAG), doc: /* *Distance between tab stops (for display of tab characters), in columns. */); DEFVAR_PER_BUFFER ("ctl-arrow", ¤t_buffer->ctl_arrow_, Qnil, @@ -5879,7 +5879,7 @@ If it is nil, that means don't auto-save this buffer. */); Backing up is done before the first time the file is saved. */); DEFVAR_PER_BUFFER ("buffer-saved-size", ¤t_buffer->save_length_, - make_number (Lisp_Int), + make_number (LISP_INT_TAG), doc: /* Length of current buffer when last read in, saved or auto-saved. 0 initially. -1 means auto-saving turned off until next real save. diff --git a/src/buffer.h b/src/buffer.h index 8f4fbfcd2e8..cfe9e037254 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -799,7 +799,7 @@ struct buffer /* *Cursor type to display in non-selected windows. t means to use hollow box cursor. See `cursor-type' for other values. */ - Lisp_Object cursor_in_non_selected_windows; + Lisp_Object cursor_in_non_selected_windows_; }; #define BUF_CURSOR_IN_NON_SELECTED_WINDOWS(BUF) *find_variable_location (&((BUF)->cursor_in_non_selected_windows_)) diff --git a/src/character.c b/src/character.c index e077edf1a78..79ddcf4a5a2 100644 --- a/src/character.c +++ b/src/character.c @@ -87,7 +87,6 @@ Lisp_Object impl_Vscript_representative_chars; static Lisp_Object Qchar_script_table; Lisp_Object impl_Vunicode_category_table; - /* If character code C has modifier masks, reflect them to the diff --git a/src/cmds.c b/src/cmds.c index 010010d8ded..8d73bc66028 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -497,8 +497,6 @@ internal_self_insert (c, noautofill) hairy = 2; } - if (NILP (BUF_ENABLE_MULTIBYTE_CHARACTERS (current_buffer))) - MAKE_CHAR_MULTIBYTE (c); synt = SYNTAX (c); if (!NILP (BUF_ABBREV_MODE (current_buffer)) diff --git a/src/composite.c b/src/composite.c index efc0bcb9615..0f26c9c3af2 100644 --- a/src/composite.c +++ b/src/composite.c @@ -1039,7 +1039,7 @@ composition_compute_stop_pos (cmp_it, charpos, bytepos, endpos, string) } if (NILP (string) && PT > charpos && PT < endpos) cmp_it->stop_pos = PT; - if (NILP (current_buffer->enable_multibyte_characters) + if (NILP (BUF_ENABLE_MULTIBYTE_CHARACTERS (current_buffer)) || NILP (Vauto_composition_mode)) return; if (bytepos < 0) @@ -1478,7 +1478,7 @@ composition_adjust_point (last_pt, new_pt) return new_pt; } - if (NILP (current_buffer->enable_multibyte_characters) + if (NILP (BUF_ENABLE_MULTIBYTE_CHARACTERS (current_buffer)) || NILP (Vauto_composition_mode)) return new_pt; @@ -1661,7 +1661,7 @@ See `find-composition' for more details. */) if (!find_composition (from, to, &start, &end, &prop, string)) { - if (!NILP (current_buffer->enable_multibyte_characters) + if (!NILP (BUF_ENABLE_MULTIBYTE_CHARACTERS (current_buffer)) && ! NILP (Vauto_composition_mode) && find_automatic_composition (from, to, &start, &end, &gstring, string)) diff --git a/src/dbusbind.c b/src/dbusbind.c index 4976bd0e169..b4e8cb08557 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -60,7 +60,7 @@ Lisp_Object QCdbus_type_array, QCdbus_type_variant; Lisp_Object QCdbus_type_struct, QCdbus_type_dict_entry; /* Hash table which keeps function definitions. */ -Lisp_Object impl_Vdbus_registered_functions_table; +Lisp_Object impl_Vdbus_registered_objects_table; /* Whether to debug D-Bus. */ Lisp_Object impl_Vdbus_debug; diff --git a/src/editfns.c b/src/editfns.c index 57537d04e62..eb3b0d9d1e3 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3282,7 +3282,7 @@ save_restriction_restore (data) ? XMARKER (XCAR (data))->buffer : XBUFFER (data)); - if (buf && buf != current_buffer && !NILP (buf->pt_marker)) + if (buf && buf != current_buffer && !NILP (BUF_PT_MARKER (buf))) { /* If `buf' uses markers to keep track of PT, BEGV, and ZV (as is the case if it is or has an indirect buffer), then make sure it is current before we update BEGV, so diff --git a/src/eval.c b/src/eval.c index 81f1dd2343b..c0e4b631a4e 100644 --- a/src/eval.c +++ b/src/eval.c @@ -47,6 +47,11 @@ struct backtrace char debug_on_exit; }; +#ifdef DEBUG_GCPRO +/* Count levels of GCPRO to detect failure to UNGCPRO. */ +int gcpro_level; +#endif + Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp, Qdefun; Lisp_Object Qinhibit_quit, impl_Vinhibit_quit, impl_Vquit_flag; Lisp_Object Qand_rest, Qand_optional; diff --git a/src/fileio.c b/src/fileio.c index ff4626ca883..a63548a2192 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4120,7 +4120,7 @@ variable `last-coding-system-used' to the coding system actually used. */) SAVE_MODIFF = MODIFF; BUF_AUTOSAVE_MODIFF (current_buffer) = MODIFF; - XSETFASTINT (current_buffer->save_length, Z - BEG); + XSETFASTINT (BUF_SAVE_LENGTH (current_buffer), Z - BEG); #ifdef CLASH_DETECTION if (NILP (handler)) { @@ -5372,7 +5372,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) internal_condition_case (auto_save_1, Qt, auto_save_error); auto_saved++; BUF_AUTOSAVE_MODIFF (b) = BUF_MODIFF (b); - XSETFASTINT (current_buffer->save_length, Z - BEG); + XSETFASTINT (BUF_SAVE_LENGTH (current_buffer), Z - BEG); set_buffer_internal (old); EMACS_GET_TIME (after_time); @@ -5419,7 +5419,7 @@ No auto-save file will be written until the buffer changes again. */) /* FIXME: This should not be called in indirect buffers, since they're not autosaved. */ BUF_AUTOSAVE_MODIFF (current_buffer) = MODIFF; - XSETFASTINT (current_buffer->save_length, Z - BEG); + XSETFASTINT (BUF_SAVE_LENGTH (current_buffer), Z - BEG); current_buffer->auto_save_failure_time = -1; return Qnil; } diff --git a/src/globals.h b/src/globals.h index 80180b83668..0b96f3289ec 100644 --- a/src/globals.h +++ b/src/globals.h @@ -51,7 +51,7 @@ #define Vcurrent_prefix_arg *find_variable_location (&impl_Vcurrent_prefix_arg) #define Vdata_directory *find_variable_location (&impl_Vdata_directory) #define Vdbus_debug *find_variable_location (&impl_Vdbus_debug) -#define Vdbus_registered_functions_table *find_variable_location (&impl_Vdbus_registered_functions_table) +#define Vdbus_registered_objects_table *find_variable_location (&impl_Vdbus_registered_objects_table) #define Vdeactivate_mark *find_variable_location (&impl_Vdeactivate_mark) #define Vdebug_ignored_errors *find_variable_location (&impl_Vdebug_ignored_errors) #define Vdebug_on_error *find_variable_location (&impl_Vdebug_on_error) diff --git a/src/image.c b/src/image.c index 4480cc52fbd..19aa8769283 100644 --- a/src/image.c +++ b/src/image.c @@ -5555,15 +5555,6 @@ png_image_p (object) #ifdef HAVE_PNG -/* png.h has a struct with a field named current_buffer. */ -#undef current_buffer - -#if defined HAVE_LIBPNG_PNG_H -# include -#else -# include -#endif - #ifdef HAVE_NTGUI /* PNG library details. */ diff --git a/src/keyboard.c b/src/keyboard.c index 15fe57094dc..696e3f6d4f9 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -501,6 +501,7 @@ Lisp_Object Qevent_symbol_elements; Lisp_Object Qmenu_enable; Lisp_Object QCenable, QCvisible, QChelp, QCfilter, QCkeys, QCkey_sequence; Lisp_Object QCbutton, QCtoggle, QCradio; +extern Lisp_Object impl_Vdefine_key_rebound_commands; extern Lisp_Object Qmenu_item; /* An event header symbol HEAD may have a property named diff --git a/src/lisp.h b/src/lisp.h index 0c4bb15551f..8b7737831be 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1947,8 +1947,8 @@ struct catchtag struct gcpro *gcpro; jmp_buf jmp; struct backtrace *backlist; - struct handler *handlerlist; - int lisp_eval_depth; + struct handler *m_handlerlist; + int m_lisp_eval_depth; int pdlcount; int poll_suppress_count; int interrupt_input_blocked; diff --git a/src/menu.h b/src/menu.h index 5f3c3d24e22..7560832c82f 100644 --- a/src/menu.h +++ b/src/menu.h @@ -19,7 +19,7 @@ along with GNU Emacs. If not, see . */ #ifndef MENU_H #define MENU_H -extern Lisp_Object Vmenu_updating_frame; +extern Lisp_Object impl_Vmenu_updating_frame; extern void init_menu_items P_ ((void)); extern void finish_menu_items P_ ((void)); diff --git a/src/search.c b/src/search.c index bcebca7e572..68e3cd03157 100644 --- a/src/search.c +++ b/src/search.c @@ -3264,7 +3264,7 @@ syms_of_search () Fput (Qinvalid_regexp, Qerror_conditions, pure_cons (Qinvalid_regexp, pure_cons (Qerror, Qnil))); Fput (Qinvalid_regexp, Qerror_message, - build_string ("Invalid regexp")); + make_pure_c_string ("Invalid regexp")); last_thing_searched = Qnil; saved_last_thing_searched = Qnil; diff --git a/src/syntax.h b/src/syntax.h index 7a02fb3b8f4..5b68da310dd 100644 --- a/src/syntax.h +++ b/src/syntax.h @@ -250,7 +250,7 @@ extern char syntax_code_spec[16]; do \ { \ gl_state.use_global = 0; \ - gl_state.current_syntax_table = current_buffer->syntax_table; \ + gl_state.current_syntax_table = BUF_SYNTAX_TABLE (current_buffer); \ } while (0) /* This macro should be called with FROM at the start of forward diff --git a/src/thread.c b/src/thread.c index 1165a9622cb..74ad6c2376e 100644 --- a/src/thread.c +++ b/src/thread.c @@ -1,5 +1,6 @@ #include +#include #include "lisp.h" #include "buffer.h" #include "blockinput.h" @@ -7,6 +8,7 @@ #include "systime.h" #include "sysselect.h" + void mark_byte_stack P_ ((struct byte_stack *)); void mark_backtrace P_ ((struct backtrace *)); void mark_catchlist P_ ((struct catchtag *)); diff --git a/src/xdisp.c b/src/xdisp.c index a6b0b04a6bc..acaa8c51418 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -18638,8 +18638,11 @@ decode_mode_spec (w, c, field_width, precision, string) case '@': { - Lisp_Object val; - val = call1 (intern ("file-remote-p"), BUF_DIRECTORY (current_buffer)); + int count = inhibit_garbage_collection (); + Lisp_Object val = call1 (intern ("file-remote-p"), + BUF_DIRECTORY (current_buffer)); + unbind_to (count, Qnil); + if (NILP (val)) return "-"; else -- 2.11.4.GIT