#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
\f
/* 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)))
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 */
\f
/* Macros for setting the BEGV, ZV or PT of a given buffer.
#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'
syms_of_sound ();
#endif
- /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */
syms_of_textprop ();
#ifdef VMS
syms_of_vmsproc ();
&& 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));
&& 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));
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);
}
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;
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;
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. */
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)
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--
/* 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)
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
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)
#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. */
set_intervals_multibyte_1 (BUF_INTERVALS (current_buffer), multi_flag,
BEG, BEG_BYTE, Z, Z_BYTE);
}
-
-#endif /* USE_TEXT_PROPERTIES */
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
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 */
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;
}
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. */
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;
}
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;
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),
#define XSETCHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_CHAR_TABLE))
#define XSETBOOL_VECTOR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BOOL_VECTOR))
\f
-#ifdef USE_TEXT_PROPERTIES
/* Basic data type for use of intervals. See the macros in intervals.h. */
struct 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 */
\f
/* In a cons, the markbit of the car is the gc mark bit */
return Fmake_byte_code (XVECTOR (tmp)->size,
XVECTOR (tmp)->contents);
}
-#ifdef USE_TEXT_PROPERTIES
if (c == '(')
{
Lisp_Object tmp;
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. */
return subtree;
}
-#ifdef USE_TEXT_PROPERTIES
case Lisp_String:
{
/* Check for text properties in each interval.
return subtree;
}
-#endif /* defined USE_TEXT_PROPERTIES */
/* Other types don't recurse any further. */
default:
#include "dispextern.h"
#include "termchar.h"
#include "keyboard.h"
-
-#ifdef USE_TEXT_PROPERTIES
#include "intervals.h"
-#endif
Lisp_Object Vstandard_output, Qstandard_output;
\f
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,
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:
}
}
-#ifdef USE_TEXT_PROPERTIES
static void
print_preprocess_string (interval, arg)
INTERVAL interval;
{
print_preprocess (interval->plist);
}
-#endif /* USE_TEXT_PROPERTIES */
static void
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;
}
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;
}
print_depth--;
}
\f
-#ifdef USE_TEXT_PROPERTIES
/* Print a description of INTERVAL using PRINTCHARFUN.
This is part of printing a string that has text properties. */
print_object (interval->plist, printcharfun, 1);
}
-#endif /* USE_TEXT_PROPERTIES */
\f
void
syms_of_print ()
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
\f
/* Types of hooks. */
Lisp_Object Qmouse_left;
/* defsubr (&Scopy_text_properties); */
}
-#else
-
-lose -- this shouldn't be compiled if USE_TEXT_PROPERTIES isn't defined
-
-#endif /* USE_TEXT_PROPERTIES */
#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. */
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. */