changeset 10606:97b210b19217

(defvar_display): New function.
author Karl Heuer <kwzh@gnu.org>
date Tue, 31 Jan 1995 01:26:09 +0000
parents bc37b55fcbb9
children 76c57a8695b2
files src/lread.c
diffstat 1 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lread.c	Tue Jan 31 00:52:50 1995 +0000
+++ b/src/lread.c	Tue Jan 31 01:26:09 1995 +0000
@@ -1817,7 +1817,7 @@
 
 /* Define an "integer variable"; a symbol whose value is forwarded
    to a C variable of type int.  Sample call: */
-  /* DEFVARINT ("indent-tabs-mode", &indent_tabs_mode, "Documentation");  */
+  /* DEFVAR_INT ("indent-tabs-mode", &indent_tabs_mode, "Documentation");  */
 void
 defvar_int (namestring, address)
      char *namestring;
@@ -1906,6 +1906,22 @@
 }
 
 #endif /* standalone */
+
+/* Similar but define a variable whose value is the Lisp Object stored
+   at a particular offset in the current perdisplay object.  */
+
+void
+defvar_display (namestring, offset)
+     char *namestring;
+     int offset;
+{
+  Lisp_Object sym, val;
+  sym = intern (namestring);
+  val = allocate_misc ();
+  XMISC (val)->type = Lisp_Misc_Display_Objfwd;
+  XDISPLAY_OBJFWD (val)->offset = offset;
+  XSYMBOL (sym)->value = val;
+}
 
 init_lread ()
 {