changeset 26404:c3c9cc1c2379

Remove USE_TEXT_PROPERTIES.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 11 Nov 1999 11:45:06 +0000
parents 03830fdf5186
children 1b44b874f555
files src/Makefile.in src/buffer.h src/config.in src/emacs.c src/indent.c src/insdel.c src/intervals.c src/intervals.h src/keyboard.c src/keymap.c src/lisp.h src/lread.c src/print.c src/textprop.c src/undo.c
diffstat 15 files changed, 4 insertions(+), 134 deletions(-) [+]
line wrap: on
line diff
--- a/src/Makefile.in	Wed Nov 10 22:53:16 1999 +0000
+++ b/src/Makefile.in	Thu Nov 11 11:45:06 1999 +0000
@@ -520,13 +520,8 @@
 #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
--- a/src/buffer.h	Wed Nov 10 22:53:16 1999 +0000
+++ b/src/buffer.h	Thu Nov 11 11:45:06 1999 +0000
@@ -199,7 +199,6 @@
 
 /* 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 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.
 
--- a/src/config.in	Wed Nov 10 22:53:16 1999 +0000
+++ b/src/config.in	Thu Nov 11 11:45:06 1999 +0000
@@ -103,10 +103,6 @@
 #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'
--- a/src/emacs.c	Wed Nov 10 22:53:16 1999 +0000
+++ b/src/emacs.c	Thu Nov 11 11:45:06 1999 +0000
@@ -1254,7 +1254,6 @@
       syms_of_sound ();
 #endif
 
-      /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */
       syms_of_textprop ();
 #ifdef VMS
       syms_of_vmsproc ();
--- a/src/indent.c	Wed Nov 10 22:53:16 1999 +0000
+++ b/src/indent.c	Thu Nov 11 11:45:06 1999 +0000
@@ -1635,14 +1635,11 @@
 		      && 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 @@
 		  && 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));
--- a/src/insdel.c	Wed Nov 10 22:53:16 1999 +0000
+++ b/src/insdel.c	Thu Nov 11 11:45:06 1999 +0000
@@ -1065,7 +1065,6 @@
   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 @@
 			     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 @@
 			     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 @@
 			     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_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 @@
 			       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 @@
   /* 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 @@
     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 @@
   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)
--- a/src/intervals.c	Wed Nov 10 22:53:16 1999 +0000
+++ b/src/intervals.c	Thu Nov 11 11:45:06 1999 +0000
@@ -46,9 +46,6 @@
 #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_1 (BUF_INTERVALS (current_buffer), multi_flag,
 			       BEG, BEG_BYTE, Z, Z_BYTE);
 }
-
-#endif /* USE_TEXT_PROPERTIES */
--- a/src/intervals.h	Wed Nov 10 22:53:16 1999 +0000
+++ b/src/intervals.h	Thu Nov 11 11:45:06 1999 +0000
@@ -18,7 +18,6 @@
 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 @@
 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 */
--- a/src/keyboard.c	Wed Nov 10 22:53:16 1999 +0000
+++ b/src/keyboard.c	Thu Nov 11 11:45:06 1999 +0000
@@ -5804,11 +5804,7 @@
 	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 @@
       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 @@
 	    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 @@
       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;
 
--- a/src/keymap.c	Wed Nov 10 22:53:16 1999 +0000
+++ b/src/keymap.c	Thu Nov 11 11:45:06 1999 +0000
@@ -2079,13 +2079,7 @@
      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),
--- a/src/lisp.h	Wed Nov 10 22:53:16 1999 +0000
+++ b/src/lisp.h	Thu Nov 11 11:45:06 1999 +0000
@@ -458,7 +458,6 @@
 #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 @@
    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 */
 
--- a/src/lread.c	Wed Nov 10 22:53:16 1999 +0000
+++ b/src/lread.c	Thu Nov 11 11:45:06 1999 +0000
@@ -1693,7 +1693,6 @@
 	  return Fmake_byte_code (XVECTOR (tmp)->size,
 				  XVECTOR (tmp)->contents);
 	}
-#ifdef USE_TEXT_PROPERTIES
       if (c == '(')
 	{
 	  Lisp_Object tmp;
@@ -1726,7 +1725,7 @@
 	  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 @@
 	return subtree;
       }
 
-#ifdef USE_TEXT_PROPERTIES
     case Lisp_String:
       {
 	/* Check for text properties in each interval.
@@ -2309,7 +2307,6 @@
 
 	return subtree;
       }
-#endif /* defined USE_TEXT_PROPERTIES */
 
       /* Other types don't recurse any further. */
     default:
--- a/src/print.c	Wed Nov 10 22:53:16 1999 +0000
+++ b/src/print.c	Thu Nov 11 11:45:06 1999 +0000
@@ -31,10 +31,7 @@
 #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 @@
 
 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 @@
       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 @@
     }
 }
 
-#ifdef USE_TEXT_PROPERTIES
 static void
 print_preprocess_string (interval, arg)
      INTERVAL interval;
@@ -1195,7 +1187,6 @@
 {
   print_preprocess (interval->plist);
 }
-#endif /* USE_TEXT_PROPERTIES */
 
 static void
 print_object (obj, printcharfun, escapeflag)
@@ -1304,13 +1295,11 @@
 
 	  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 @@
 	    }
 	  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_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_object (interval->plist, printcharfun, 1);
 }
 
-#endif /* USE_TEXT_PROPERTIES */
 
 void
 syms_of_print ()
--- a/src/textprop.c	Wed Nov 10 22:53:16 1999 +0000
+++ b/src/textprop.c	Thu Nov 11 11:45:06 1999 +0000
@@ -46,8 +46,6 @@
   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 @@
 /*  defsubr (&Scopy_text_properties); */
 }
 
-#else
-
-lose -- this shouldn't be compiled if USE_TEXT_PROPERTIES isn't defined
-
-#endif /* USE_TEXT_PROPERTIES */
--- a/src/undo.c	Wed Nov 10 22:53:16 1999 +0000
+++ b/src/undo.c	Thu Nov 11 11:45:06 1999 +0000
@@ -448,7 +448,6 @@
 #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 @@
 
 		  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.  */