DEFUN ("read-char", Fread_char, Sread_char, 0, 0, 0,
"Read a character from the command input (keyboard or macro).\n\
-It is returned as a number.")
+It is returned as a number.\n\
+If the user generates an event which is not a character (i.e. a mouse\n\
+click or function key event), `read-char' signals an error. If you\n\
+want to read non-character events, or ignore them, call `read-event'\n\
+or `read-char-exclusive' instead.")
()
{
register Lisp_Object val;
return val;
}
-#ifdef HAVE_X_WINDOWS
DEFUN ("read-event", Fread_event, Sread_event, 0, 0, 0,
"Read an event object from the input stream.")
()
val = read_char (0);
return val;
}
-#endif
DEFUN ("read-char-exclusive", Fread_char_exclusive, Sread_char_exclusive, 0, 0, 0,
"Read a character from the command input (keyboard or macro).\n\
register Lisp_Object val;
#ifndef standalone
- val = read_char (0);
- while (XTYPE (val) != Lisp_Int)
- val = read_char (0);
+ do
+ {
+ val = read_char (0);
+ }
+ while (XTYPE (val) != Lisp_Int);
#else
val = getchar ();
#endif
the current buffer. address is the address of the slot in the buffer that is current now. */
void
-defvar_per_buffer (namestring, address, doc)
+defvar_per_buffer (namestring, address, type, doc)
char *namestring;
Lisp_Object *address;
+ Lisp_Object type;
char *doc;
{
Lisp_Object sym;
XSET (XSYMBOL (sym)->value, Lisp_Buffer_Objfwd,
(Lisp_Object *) offset);
*(Lisp_Object *)(offset + (char *)&buffer_local_symbols) = sym;
+ *(Lisp_Object *)(offset + (char *)&buffer_local_types) = type;
if (*(int *)(offset + (char *)&buffer_local_flags) == 0)
/* Did a DEFVAR_PER_BUFFER without initializing the corresponding
slot of buffer_local_flags */
defsubr (&Seval_region);
defsubr (&Sread_char);
defsubr (&Sread_char_exclusive);
-#ifdef HAVE_X_WINDOWS
defsubr (&Sread_event);
-#endif /* HAVE_X_WINDOWS */
defsubr (&Sget_file_char);
defsubr (&Smapatoms);