Remove USE_TEXT_PROPERTIES.

This commit is contained in:
Gerd Moellmann 1999-11-11 11:45:06 +00:00
parent 35a5514b96
commit 339ee9797d
15 changed files with 4 additions and 134 deletions

View file

@ -520,13 +520,8 @@ ALL_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_MACHINE \
#define UNEXEC_SRC unexec.c
#endif
#ifdef USE_TEXT_PROPERTIES
#define INTERVAL_SRC intervals.h
#define INTERVAL_OBJ intervals.o textprop.o
#else
#define INTERVAL_SRC
#define INTERVAL_OBJ
#endif
#ifdef HAVE_GETLOADAVG
#define GETLOADAVG_OBJ

View file

@ -199,7 +199,6 @@ Boston, MA 02111-1307, USA. */
/* Macros to set PT in the current buffer, or another buffer.. */
#ifdef USE_TEXT_PROPERTIES
#define SET_PT(position) (set_point (current_buffer, (position)))
#define TEMP_SET_PT(position) (temp_set_point (current_buffer, (position)))
@ -218,22 +217,6 @@ extern INLINE void temp_set_point P_ ((struct buffer *, int));
extern void set_point_both P_ ((struct buffer *, int, int));
extern INLINE void temp_set_point_both P_ ((struct buffer *, int, int));
#else /* don't support text properties */
#define SET_PT(position) (current_buffer->pt = (position))
#define TEMP_SET_PT(position) (current_buffer->pt = (position))
#define SET_PT_BOTH(position, byte) \
(current_buffer->pt = (position), \
current_buffer->pt_byte = (byte))
#define TEMP_SET_PT_BOTH(position, byte) \
(current_buffer->pt = (position), \
current_buffer->pt_byte = (byte))
#define BUF_SET_PT(buffer, position) (buffer->pt = (position))
#define BUF_TEMP_SET_PT(buffer, position) (buffer->pt = (position))
#endif /* don't support text properties */
/* Macros for setting the BEGV, ZV or PT of a given buffer.

View file

@ -103,10 +103,6 @@ Boston, MA 02111-1307, USA. */
#define HAVE_MOUSE
#endif
/* Define USE_TEXT_PROPERTIES to support visual and other properties
on text. */
#define USE_TEXT_PROPERTIES
/* Define USER_FULL_NAME to return a string
that is the user's full name.
It can assume that the variable `pw'

View file

@ -1254,7 +1254,6 @@ the Bugs section of the Emacs manual or the file BUGS.\n", argv[0]);
syms_of_sound ();
#endif
/* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */
syms_of_textprop ();
#ifdef VMS
syms_of_vmsproc ();

View file

@ -1635,14 +1635,11 @@ vmotion (from, vtarget, w)
&& indented_beyond_p (XFASTINT (prevline),
CHAR_TO_BYTE (XFASTINT (prevline)),
selective))
#ifdef USE_TEXT_PROPERTIES
/* watch out for newlines with `invisible' property */
|| (propval = Fget_char_property (prevline,
Qinvisible,
text_prop_object),
TEXT_PROP_MEANS_INVISIBLE (propval))
#endif
))
TEXT_PROP_MEANS_INVISIBLE (propval))))
XSETFASTINT (prevline,
find_next_newline_no_quit (XFASTINT (prevline) - 1,
-1));
@ -1698,13 +1695,10 @@ vmotion (from, vtarget, w)
&& indented_beyond_p (XFASTINT (prevline),
CHAR_TO_BYTE (XFASTINT (prevline)),
selective))
#ifdef USE_TEXT_PROPERTIES
/* watch out for newlines with `invisible' property */
|| (propval = Fget_char_property (prevline, Qinvisible,
text_prop_object),
TEXT_PROP_MEANS_INVISIBLE (propval))
#endif
))
TEXT_PROP_MEANS_INVISIBLE (propval))))
XSETFASTINT (prevline,
find_next_newline_no_quit (XFASTINT (prevline) - 1,
-1));

View file

@ -1065,7 +1065,6 @@ combine_bytes (pos, pos_byte, nbytes)
ADJUST_CHAR_POS (ZV, ZV_BYTE);
if (BUF_INTERVALS (current_buffer) != 0)
/* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES. */
offset_intervals (current_buffer, pos, - nbytes);
}
@ -1185,15 +1184,12 @@ insert_1_both (string, nchars, nbytes, inherit, prepare, before_markers)
combined_before_bytes, combined_after_bytes,
before_markers);
#ifdef USE_TEXT_PROPERTIES
if (BUF_INTERVALS (current_buffer) != 0)
/* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES. */
offset_intervals (current_buffer, PT, nchars);
if (!inherit && BUF_INTERVALS (current_buffer) != 0)
Fset_text_properties (make_number (PT), make_number (PT + nchars),
Qnil, Qnil);
#endif
{
int pos = PT, pos_byte = PT_BYTE;
@ -1371,7 +1367,6 @@ insert_from_string_1 (string, pos, pos_byte, nchars, nbytes,
combined_before_bytes, combined_after_bytes,
before_markers);
/* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */
offset_intervals (current_buffer, PT, nchars);
intervals = XSTRING (string)->intervals;
@ -1580,10 +1575,8 @@ insert_from_buffer_1 (buf, from, nchars, inherit)
PT_BYTE + outgoing_nbytes,
combined_before_bytes, combined_after_bytes, 0);
#ifdef USE_TEXT_PROPERTIES
if (BUF_INTERVALS (current_buffer) != 0)
offset_intervals (current_buffer, PT, nchars);
#endif
/* Get the intervals for the part of the string we are inserting--
not including the combined-before bytes. */
@ -1735,12 +1728,10 @@ adjust_after_replace (from, from_byte, prev_text, len, len_byte)
adjust_overlays_for_insert (from, len - nchars_del);
else if (len < nchars_del)
adjust_overlays_for_delete (from, nchars_del - len);
#ifdef USE_TEXT_PROPERTIES
if (BUF_INTERVALS (current_buffer) != 0)
{
offset_intervals (current_buffer, from, len - nchars_del);
}
#endif
{
if (from < PT)
@ -2011,7 +2002,6 @@ replace_range (from, to, new, prepare, inherit, markers)
from + inschars, from_byte + outgoing_insbytes,
combined_before_bytes, combined_after_bytes, 0);
#ifdef USE_TEXT_PROPERTIES
offset_intervals (current_buffer, from, inschars - nchars_del);
/* Get the intervals for the part of the string we are inserting--
@ -2020,7 +2010,6 @@ replace_range (from, to, new, prepare, inherit, markers)
/* Insert those intervals. */
graft_intervals_into_buffer (intervals, from, inschars,
current_buffer, inherit);
#endif
/* Relocate point as if it were a marker. */
if (from < PT)
@ -2250,7 +2239,6 @@ del_range_2 (from, from_byte, to, to_byte)
adjust_point (from - (PT < to ? PT : to),
from_byte - (PT_BYTE < to_byte ? PT_BYTE : to_byte));
/* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */
offset_intervals (current_buffer, from, - nchars_del);
/* Adjust the overlay center as needed. This must be done after
@ -2352,7 +2340,6 @@ prepare_to_modify_buffer (start, end, preserve_ptr)
if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer)
++windows_or_buffers_changed;
/* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */
if (BUF_INTERVALS (current_buffer) != 0)
{
if (preserve_ptr)

View file

@ -46,9 +46,6 @@ Boston, MA 02111-1307, USA. */
#include "puresize.h"
#include "keyboard.h"
/* The rest of the file is within this conditional. */
#ifdef USE_TEXT_PROPERTIES
/* Test for membership, allowing for t (actually any non-cons) to mean the
universal set. */
@ -2238,5 +2235,3 @@ set_intervals_multibyte (multi_flag)
set_intervals_multibyte_1 (BUF_INTERVALS (current_buffer), multi_flag,
BEG, BEG_BYTE, Z, Z_BYTE);
}
#endif /* USE_TEXT_PROPERTIES */

View file

@ -18,7 +18,6 @@ along with GNU Emacs; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifdef USE_TEXT_PROPERTIES
#ifndef NORMAL_FACE
#include "dispextern.h"
#endif
@ -269,20 +268,3 @@ int add_text_properties_from_list P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
void extend_property_ranges P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
extern void syms_of_textprop ();
#else /* don't support text properties */
#define NULL_INTERVAL_P(i) 1
#define INTERVAL_SIZE 0
#define INTERVAL_PTR_SIZE 0
#define copy_intervals_to_string(string,buffer,position,length)
#define verify_interval_modification(buffer,start,end)
#define insert_interval_copy(source,position,end,sink,at)
#define graft_intervals_into_buffer(tree,position,bufferptr)
#define offset_intervals(buffer,position,length)
#define copy_intervals(tree,start,length)
#define syms_of_textprop()
#endif /* don't support text properties */

View file

@ -5804,11 +5804,7 @@ menu_bar_items (old)
nmaps = current_minor_maps (NULL, &tmaps);
maps = (Lisp_Object *) alloca ((nmaps + 2) * sizeof (maps[0]));
bcopy (tmaps, maps, nmaps * sizeof (maps[0]));
#ifdef USE_TEXT_PROPERTIES
maps[nmaps++] = get_local_map (PT, current_buffer);
#else
maps[nmaps++] = current_buffer->keymap;
#endif
}
maps[nmaps++] = current_global_map;
}
@ -6460,11 +6456,7 @@ tool_bar_items (reuse, nitems)
nmaps = current_minor_maps (NULL, &tmaps);
maps = (Lisp_Object *) alloca ((nmaps + 2) * sizeof (maps[0]));
bcopy (tmaps, maps, nmaps * sizeof (maps[0]));
#ifdef USE_TEXT_PROPERTIES
maps[nmaps++] = get_local_map (PT, current_buffer);
#else
maps[nmaps++] = current_buffer->keymap;
#endif
}
/* Add global keymap at the end. */
@ -7441,11 +7433,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
nmaps_allocated = nmaps + 2;
}
bcopy (maps, submaps, nmaps * sizeof (submaps[0]));
#ifdef USE_TEXT_PROPERTIES
submaps[nmaps++] = orig_local_map;
#else
submaps[nmaps++] = current_buffer->keymap;
#endif
}
submaps[nmaps++] = current_global_map;
}
@ -8737,11 +8725,7 @@ current_active_maps (maps_p)
nmaps = current_minor_maps (NULL, &tmaps);
maps = (Lisp_Object *) xmalloc ((nmaps + 2) * sizeof (maps[0]));
bcopy (tmaps, maps, nmaps * sizeof (maps[0]));
#ifdef USE_TEXT_PROPERTIES
maps[nmaps++] = get_local_map (PT, current_buffer);
#else
maps[nmaps++] = current_buffer->keymap;
#endif
}
maps[nmaps++] = current_global_map;

View file

@ -2079,13 +2079,7 @@ indirect definition itself.")
shadowed bindings. */
keymap1 = keymap;
if (! keymap_specified)
{
#ifdef USE_TEXT_PROPERTIES
keymap1 = get_local_map (PT, current_buffer);
#else
keymap1 = current_buffer->keymap;
#endif
}
keymap1 = get_local_map (PT, current_buffer);
if (!NILP (keymap1))
maps = nconc2 (Faccessible_keymaps (get_keymap (keymap1), Qnil),

View file

@ -458,7 +458,6 @@ extern Lisp_Object make_number ();
#define XSETCHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_CHAR_TABLE))
#define XSETBOOL_VECTOR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BOOL_VECTOR))
#ifdef USE_TEXT_PROPERTIES
/* Basic data type for use of intervals. See the macros in intervals.h. */
struct interval
@ -519,17 +518,6 @@ typedef struct interval *INTERVAL;
certain code. See, e.g., alloc.c. */
#define INITIALIZE_INTERVAL(ptr,val) ptr->intervals = val
#else /* No text properties */
/* If no intervals are used, make the above definitions go away. */
#define CHECK_STRING_OR_BUFFER(x, i)
#define INTERVAL
#define DECLARE_INTERVALS
#define INITIALIZE_INTERVAL(ptr,val)
#endif /* USE_TEXT_PROPERTIES */
/* In a cons, the markbit of the car is the gc mark bit */

View file

@ -1693,7 +1693,6 @@ read1 (readcharfun, pch, first_in_list)
return Fmake_byte_code (XVECTOR (tmp)->size,
XVECTOR (tmp)->contents);
}
#ifdef USE_TEXT_PROPERTIES
if (c == '(')
{
Lisp_Object tmp;
@ -1726,7 +1725,7 @@ read1 (readcharfun, pch, first_in_list)
UNGCPRO;
return tmp;
}
#endif
/* #@NUMBER is used to skip NUMBER following characters.
That's used in .elc files to skip over doc strings
and function definitions. */
@ -2295,7 +2294,6 @@ substitute_object_recurse (object, placeholder, subtree)
return subtree;
}
#ifdef USE_TEXT_PROPERTIES
case Lisp_String:
{
/* Check for text properties in each interval.
@ -2309,7 +2307,6 @@ substitute_object_recurse (object, placeholder, subtree)
return subtree;
}
#endif /* defined USE_TEXT_PROPERTIES */
/* Other types don't recurse any further. */
default:

View file

@ -31,10 +31,7 @@ Boston, MA 02111-1307, USA. */
#include "dispextern.h"
#include "termchar.h"
#include "keyboard.h"
#ifdef USE_TEXT_PROPERTIES
#include "intervals.h"
#endif
Lisp_Object Vstandard_output, Qstandard_output;
@ -669,9 +666,7 @@ buffer and calling the hook. It gets one argument, the buffer to display.")
static void print ();
static void print_preprocess ();
#ifdef USE_TEXT_PROPERTIES
static void print_preprocess_string ();
#endif /* USE_TEXT_PROPERTIES */
static void print_object ();
DEFUN ("terpri", Fterpri, Sterpri, 0, 1, 0,
@ -1167,11 +1162,9 @@ print_preprocess (obj)
switch (XGCTYPE (obj))
{
case Lisp_String:
#ifdef USE_TEXT_PROPERTIES
/* A string may have text properties, which can be circular. */
traverse_intervals (XSTRING (obj)->intervals, 0, 0,
print_preprocess_string, Qnil);
#endif /* USE_TEXT_PROPERTIES */
break;
case Lisp_Cons:
@ -1187,7 +1180,6 @@ print_preprocess (obj)
}
}
#ifdef USE_TEXT_PROPERTIES
static void
print_preprocess_string (interval, arg)
INTERVAL interval;
@ -1195,7 +1187,6 @@ print_preprocess_string (interval, arg)
{
print_preprocess (interval->plist);
}
#endif /* USE_TEXT_PROPERTIES */
static void
print_object (obj, printcharfun, escapeflag)
@ -1304,13 +1295,11 @@ print_object (obj, printcharfun, escapeflag)
GCPRO1 (obj);
#ifdef USE_TEXT_PROPERTIES
if (!NULL_INTERVAL_P (XSTRING (obj)->intervals))
{
PRINTCHAR ('#');
PRINTCHAR ('(');
}
#endif
PRINTCHAR ('\"');
str = XSTRING (obj)->data;
@ -1388,14 +1377,12 @@ print_object (obj, printcharfun, escapeflag)
}
PRINTCHAR ('\"');
#ifdef USE_TEXT_PROPERTIES
if (!NULL_INTERVAL_P (XSTRING (obj)->intervals))
{
traverse_intervals (XSTRING (obj)->intervals,
0, 0, print_interval, printcharfun);
PRINTCHAR (')');
}
#endif
UNGCPRO;
}
@ -1864,7 +1851,6 @@ print_object (obj, printcharfun, escapeflag)
print_depth--;
}
#ifdef USE_TEXT_PROPERTIES
/* Print a description of INTERVAL using PRINTCHARFUN.
This is part of printing a string that has text properties. */
@ -1883,7 +1869,6 @@ print_interval (interval, printcharfun)
print_object (interval->plist, printcharfun, 1);
}
#endif /* USE_TEXT_PROPERTIES */
void
syms_of_print ()

View file

@ -46,8 +46,6 @@ Boston, MA 02111-1307, USA. */
necessary for the system to remain consistent. This requirement
is enforced by the subrs installing properties onto the intervals. */
/* The rest of the file is within this conditional */
#ifdef USE_TEXT_PROPERTIES
/* Types of hooks. */
Lisp_Object Qmouse_left;
@ -1882,8 +1880,3 @@ This also inhibits the use of the `intangible' text property.");
/* defsubr (&Scopy_text_properties); */
}
#else
lose -- this shouldn't be compiled if USE_TEXT_PROPERTIES isn't defined
#endif /* USE_TEXT_PROPERTIES */

View file

@ -448,7 +448,6 @@ Return what remains of the list.")
#endif /* CLASH_DETECTION */
Fset_buffer_modified_p (Qnil);
}
#ifdef USE_TEXT_PROPERTIES
else if (EQ (car, Qnil))
{
/* Element (nil prop val beg . end) is property change. */
@ -463,7 +462,6 @@ Return what remains of the list.")
Fput_text_property (beg, end, prop, val, Qnil);
}
#endif /* USE_TEXT_PROPERTIES */
else if (INTEGERP (car) && INTEGERP (cdr))
{
/* Element (BEG . END) means range was inserted. */