comparison src/marker.c @ 9121:faecbbbcceb4

(Fset_marker, set_marker_restricted, Fcopy_marker): Use type test macros.
author Karl Heuer <kwzh@gnu.org>
date Tue, 27 Sep 1994 02:24:00 +0000
parents 6f0d48241807
children bb50d17f7441
comparison
equal deleted inserted replaced
9120:ed766dfb4efe 9121:faecbbbcceb4
86 86
87 CHECK_MARKER (marker, 0); 87 CHECK_MARKER (marker, 0);
88 /* If position is nil or a marker that points nowhere, 88 /* If position is nil or a marker that points nowhere,
89 make this marker point nowhere. */ 89 make this marker point nowhere. */
90 if (NILP (pos) 90 if (NILP (pos)
91 || (XTYPE (pos) == Lisp_Marker && !XMARKER (pos)->buffer)) 91 || (MARKERP (pos) && !XMARKER (pos)->buffer))
92 { 92 {
93 unchain_marker (marker); 93 unchain_marker (marker);
94 return marker; 94 return marker;
95 } 95 }
96 96
143 143
144 CHECK_MARKER (marker, 0); 144 CHECK_MARKER (marker, 0);
145 /* If position is nil or a marker that points nowhere, 145 /* If position is nil or a marker that points nowhere,
146 make this marker point nowhere. */ 146 make this marker point nowhere. */
147 if (NILP (pos) || 147 if (NILP (pos) ||
148 (XTYPE (pos) == Lisp_Marker && !XMARKER (pos)->buffer)) 148 (MARKERP (pos) && !XMARKER (pos)->buffer))
149 { 149 {
150 unchain_marker (marker); 150 unchain_marker (marker);
151 return marker; 151 return marker;
152 } 152 }
153 153
269 { 269 {
270 register Lisp_Object new; 270 register Lisp_Object new;
271 271
272 while (1) 272 while (1)
273 { 273 {
274 if (XTYPE (marker) == Lisp_Int 274 if (INTEGERP (marker) || MARKERP (marker))
275 || XTYPE (marker) == Lisp_Marker)
276 { 275 {
277 new = Fmake_marker (); 276 new = Fmake_marker ();
278 Fset_marker (new, marker, 277 Fset_marker (new, marker,
279 ((XTYPE (marker) == Lisp_Marker) 278 (MARKERP (marker) ? Fmarker_buffer (marker) : Qnil));
280 ? Fmarker_buffer (marker)
281 : Qnil));
282 return new; 279 return new;
283 } 280 }
284 else 281 else
285 marker = wrong_type_argument (Qinteger_or_marker_p, marker); 282 marker = wrong_type_argument (Qinteger_or_marker_p, marker);
286 } 283 }