Mercurial > emacs
comparison src/marker.c @ 484:3165b2697c78
entered into RCS
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Mon, 13 Jan 1992 21:48:03 +0000 |
parents | 49342840ba00 |
children | 1fc792473491 |
comparison
equal
deleted
inserted
replaced
483:00f564a647fa | 484:3165b2697c78 |
---|---|
34 CHECK_MARKER (marker, 0); | 34 CHECK_MARKER (marker, 0); |
35 if (XMARKER (marker)->buffer) | 35 if (XMARKER (marker)->buffer) |
36 { | 36 { |
37 XSET (buf, Lisp_Buffer, XMARKER (marker)->buffer); | 37 XSET (buf, Lisp_Buffer, XMARKER (marker)->buffer); |
38 /* Return marker's buffer only if it is not dead. */ | 38 /* Return marker's buffer only if it is not dead. */ |
39 if (!NULL (XBUFFER (buf)->name)) | 39 if (!NILP (XBUFFER (buf)->name)) |
40 return buf; | 40 return buf; |
41 } | 41 } |
42 return Qnil; | 42 return Qnil; |
43 } | 43 } |
44 | 44 |
85 register struct Lisp_Marker *m; | 85 register struct Lisp_Marker *m; |
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 (NULL (pos) | 90 if (NILP (pos) |
91 || (XTYPE (pos) == Lisp_Marker && !XMARKER (pos)->buffer)) | 91 || (XTYPE (pos) == Lisp_Marker && !XMARKER (pos)->buffer)) |
92 { | 92 { |
93 unchain_marker (marker); | 93 unchain_marker (marker); |
94 return marker; | 94 return marker; |
95 } | 95 } |
96 | 96 |
97 CHECK_NUMBER_COERCE_MARKER (pos, 1); | 97 CHECK_NUMBER_COERCE_MARKER (pos, 1); |
98 if (NULL (buffer)) | 98 if (NILP (buffer)) |
99 b = current_buffer; | 99 b = current_buffer; |
100 else | 100 else |
101 { | 101 { |
102 CHECK_BUFFER (buffer, 1); | 102 CHECK_BUFFER (buffer, 1); |
103 b = XBUFFER (buffer); | 103 b = XBUFFER (buffer); |
142 register struct Lisp_Marker *m; | 142 register struct Lisp_Marker *m; |
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 (NULL (pos) || | 147 if (NILP (pos) || |
148 (XTYPE (pos) == Lisp_Marker && !XMARKER (pos)->buffer)) | 148 (XTYPE (pos) == Lisp_Marker && !XMARKER (pos)->buffer)) |
149 { | 149 { |
150 unchain_marker (marker); | 150 unchain_marker (marker); |
151 return marker; | 151 return marker; |
152 } | 152 } |
153 | 153 |
154 CHECK_NUMBER_COERCE_MARKER (pos, 1); | 154 CHECK_NUMBER_COERCE_MARKER (pos, 1); |
155 if (NULL (buffer)) | 155 if (NILP (buffer)) |
156 b = current_buffer; | 156 b = current_buffer; |
157 else | 157 else |
158 { | 158 { |
159 CHECK_BUFFER (buffer, 1); | 159 CHECK_BUFFER (buffer, 1); |
160 b = XBUFFER (buffer); | 160 b = XBUFFER (buffer); |
213 next = XMARKER (tail)->chain; | 213 next = XMARKER (tail)->chain; |
214 XUNMARK (next); | 214 XUNMARK (next); |
215 | 215 |
216 if (XMARKER (marker) == XMARKER (tail)) | 216 if (XMARKER (marker) == XMARKER (tail)) |
217 { | 217 { |
218 if (NULL (prev)) | 218 if (NILP (prev)) |
219 { | 219 { |
220 b->markers = next; | 220 b->markers = next; |
221 /* Deleting first marker from the buffer's chain. | 221 /* Deleting first marker from the buffer's chain. |
222 Crash if new first marker in chain does not say | 222 Crash if new first marker in chain does not say |
223 it belongs to this buffer. */ | 223 it belongs to this buffer. */ |