Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
464f8898
Commit
464f8898
authored
Jun 07, 1992
by
Richard M. Stallman
Browse files
*** empty log message ***
parent
706ac90d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
32 deletions
+39
-32
src/data.c
src/data.c
+32
-26
src/keyboard.c
src/keyboard.c
+5
-4
src/lisp.h
src/lisp.h
+2
-2
No files found.
src/data.c
View file @
464f8898
...
...
@@ -49,7 +49,7 @@ Lisp_Object Qboundp, Qfboundp;
Lisp_Object
Qcdr
;
#ifdef LISP_FLOAT_TYPE
Lisp_Object
Qfloatp
,
Qinteger_or_floatp
,
Qinteger_or_float_or_marker_p
;
Lisp_Object
Qfloatp
;
Lisp_Object
Qnumberp
,
Qnumber_or_marker_p
;
#endif
...
...
@@ -246,16 +246,6 @@ DEFUN ("markerp", Fmarkerp, Smarkerp, 1, 1, 0, "T if OBJECT is a marker (editor
return
Qnil
;
}
DEFUN
(
"integer-or-marker-p"
,
Finteger_or_marker_p
,
Sinteger_or_marker_p
,
1
,
1
,
0
,
"T if OBJECT is an integer or a marker (editor pointer)."
)
(
obj
)
register
Lisp_Object
obj
;
{
if
(
XTYPE
(
obj
)
==
Lisp_Marker
||
XTYPE
(
obj
)
==
Lisp_Int
)
return
Qt
;
return
Qnil
;
}
DEFUN
(
"subrp"
,
Fsubrp
,
Ssubrp
,
1
,
1
,
0
,
"T if OBJECT is a built-in function."
)
(
obj
)
Lisp_Object
obj
;
...
...
@@ -293,22 +283,21 @@ DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0, "T if OBJECT is a number.")
return
Qnil
;
}
DEFUN
(
"natnump"
,
Fnatnump
,
Snatnump
,
1
,
1
,
0
,
"T if OBJECT is a nonnegative number."
)
DEFUN
(
"integer-or-marker-p"
,
Finteger_or_marker_p
,
Sinteger_or_marker_p
,
1
,
1
,
0
,
"T if OBJECT is an integer or a marker (editor pointer)."
)
(
obj
)
Lisp_Object
obj
;
register
Lisp_Object
obj
;
{
if
(
XTYPE
(
obj
)
==
Lisp_
Int
&&
XINT
(
obj
)
>
=
0
)
if
(
XTYPE
(
obj
)
==
Lisp_
Marker
||
XTYPE
(
obj
)
=
=
Lisp_Int
)
return
Qt
;
return
Qnil
;
}
#ifdef LISP_FLOAT_TYPE
DEFUN
(
"floatp"
,
Ffloatp
,
Sfloatp
,
1
,
1
,
0
,
"T if OBJECT is a floating point number."
)
DEFUN
(
"natnump"
,
Fnatnump
,
Snatnump
,
1
,
1
,
0
,
"T if OBJECT is a nonnegative number."
)
(
obj
)
Lisp_Object
obj
;
{
if
(
XTYPE
(
obj
)
==
Lisp_
Float
)
if
(
XTYPE
(
obj
)
==
Lisp_
Int
&&
XINT
(
obj
)
>=
0
)
return
Qt
;
return
Qnil
;
}
...
...
@@ -318,7 +307,11 @@ DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0,
(
obj
)
Lisp_Object
obj
;
{
if
(
XTYPE
(
obj
)
==
Lisp_Float
||
XTYPE
(
obj
)
==
Lisp_Int
)
if
(
0
#ifdef LISP_FLOAT_TYPE
||
XTYPE
(
obj
)
==
Lisp_Float
#endif
||
XTYPE
(
obj
)
==
Lisp_Int
)
return
Qt
;
return
Qnil
;
}
...
...
@@ -329,12 +322,25 @@ DEFUN ("number-or-marker-p", Fnumber_or_marker_p,
(
obj
)
Lisp_Object
obj
;
{
if
(
XTYPE
(
obj
)
==
Lisp_Float
||
XTYPE
(
obj
)
==
Lisp_Int
if
(
XTYPE
(
obj
)
==
Lisp_Int
#ifdef LISP_FLOAT_TYPE
||
XTYPE
(
obj
)
==
Lisp_Float
#endif
||
XTYPE
(
obj
)
==
Lisp_Marker
)
return
Qt
;
return
Qnil
;
}
#ifdef LISP_FLOAT_TYPE
DEFUN
(
"floatp"
,
Ffloatp
,
Sfloatp
,
1
,
1
,
0
,
"T if OBJECT is a floating point number."
)
(
obj
)
Lisp_Object
obj
;
{
if
(
XTYPE
(
obj
)
==
Lisp_Float
)
return
Qt
;
return
Qnil
;
}
#endif
/* LISP_FLOAT_TYPE */
/* Extract and set components of lists */
...
...
@@ -1922,8 +1928,8 @@ syms_of_data ()
staticpro
(
&
Qinteger_or_marker_p
);
#ifdef LISP_FLOAT_TYPE
staticpro
(
&
Qfloatp
);
staticpro
(
&
Q
integer_or_float
p
);
staticpro
(
&
Q
integer_or_float
_or_marker_p
);
staticpro
(
&
Q
number
p
);
staticpro
(
&
Q
number
_or_marker_p
);
#endif
/* LISP_FLOAT_TYPE */
staticpro
(
&
Qboundp
);
...
...
@@ -1937,10 +1943,11 @@ syms_of_data ()
defsubr
(
&
Sconsp
);
defsubr
(
&
Satom
);
defsubr
(
&
Sintegerp
);
#ifdef LISP_FLOAT_TYPE
defsubr
(
&
Sfloatp
);
defsubr
(
&
Sinteger_or_marker_p
);
defsubr
(
&
Snumberp
);
defsubr
(
&
Snumber_or_marker_p
);
#ifdef LISP_FLOAT_TYPE
defsubr
(
&
Sfloatp
);
#endif
/* LISP_FLOAT_TYPE */
defsubr
(
&
Snatnump
);
defsubr
(
&
Ssymbolp
);
...
...
@@ -1950,7 +1957,6 @@ syms_of_data ()
defsubr
(
&
Ssequencep
);
defsubr
(
&
Sbufferp
);
defsubr
(
&
Smarkerp
);
defsubr
(
&
Sinteger_or_marker_p
);
defsubr
(
&
Ssubrp
);
defsubr
(
&
Scompiled_function_p
);
defsubr
(
&
Schar_or_string_p
);
...
...
src/keyboard.c
View file @
464f8898
...
...
@@ -3349,12 +3349,13 @@ quit_throw_to_read_char ()
DEFUN
(
"set-input-mode"
,
Fset_input_mode
,
Sset_input_mode
,
3
,
4
,
0
,
"Set mode of reading keyboard input.
\n
\
First arg non-nil means use input interrupts; nil means use CBREAK mode.
\n
\
Second arg non-nil means use ^S/^Q flow control for output to terminal
\n
\
First arg INTERRUPT non-nil means use input interrupts;
\n
\
nil means use CBREAK mode.
\n
\
Second arg FLOW non-nil means use ^S/^Q flow control for output to terminal
\n
\
(no effect except in CBREAK mode).
\n
\
Third arg non-nil means accept 8-bit input (for a Meta key).
\n
\
Third arg
META
non-nil means accept 8-bit input (for a Meta key).
\n
\
Otherwise, the top bit is ignored, on the assumption it is parity.
\n
\
Optional fourth arg non-nil specifies character to use for quitting."
)
Optional fourth arg
QUIT if
non-nil specifies character to use for quitting."
)
(
interrupt
,
flow
,
meta
,
quit
)
Lisp_Object
interrupt
,
flow
,
meta
,
quit
;
{
...
...
src/lisp.h
View file @
464f8898
...
...
@@ -571,12 +571,12 @@ typedef unsigned char UCHAR;
#define CHECK_NUMBER_OR_FLOAT(x, i) \
{ if (XTYPE (x) != Lisp_Float && XTYPE (x) != Lisp_Int) \
x = wrong_type_argument (Q
integer_or_float
p, (x)); }
x = wrong_type_argument (Q
number
p, (x)); }
#define CHECK_NUMBER_OR_FLOAT_COERCE_MARKER(x, i) \
{ if (XTYPE (x) == Lisp_Marker) XFASTINT (x) = marker_position (x); \
else if (XTYPE (x) != Lisp_Int && XTYPE (x) != Lisp_Float) \
x = wrong_type_argument (Q
integer_or_float
_or_marker_p, (x)); }
x = wrong_type_argument (Q
number
_or_marker_p, (x)); }
#else
/* Not LISP_FLOAT_TYPE */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment