aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorStefan Monnier2002-10-22 18:57:19 +0000
committerStefan Monnier2002-10-22 18:57:19 +0000
commit6d70a280d5a838ea61fd08538742b4ca5f6e9a46 (patch)
tree51de4e55ff36b0a0c70b05d4200b666d762a4f87 /src/buffer.c
parent2c762cee38dfa162d5de5e78e1c7d4880ccec057 (diff)
downloademacs-6d70a280d5a838ea61fd08538742b4ca5f6e9a46.tar.gz
emacs-6d70a280d5a838ea61fd08538742b4ca5f6e9a46.zip
(assoc_ignore_text_properties, Fother_buffer, Fkill_buffer)
(call_overlay_mod_hooks): Use CONSP and XCAR/XCDR. (Fget_buffer_create, advance_to_char_boundary): Use BEG and BEG_BYTE;
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/buffer.c b/src/buffer.c
index d1ee97c1924..e413c58def6 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -249,10 +249,10 @@ assoc_ignore_text_properties (key, list)
249 Lisp_Object list; 249 Lisp_Object list;
250{ 250{
251 register Lisp_Object tail; 251 register Lisp_Object tail;
252 for (tail = list; !NILP (tail); tail = Fcdr (tail)) 252 for (tail = list; CONSP (tail); tail = XCDR (tail))
253 { 253 {
254 register Lisp_Object elt, tem; 254 register Lisp_Object elt, tem;
255 elt = Fcar (tail); 255 elt = XCAR (tail);
256 tem = Fstring_equal (Fcar (elt), key); 256 tem = Fstring_equal (Fcar (elt), key);
257 if (!NILP (tem)) 257 if (!NILP (tem))
258 return elt; 258 return elt;
@@ -363,16 +363,16 @@ The value is never nil. */)
363 if (! BUF_BEG_ADDR (b)) 363 if (! BUF_BEG_ADDR (b))
364 buffer_memory_full (); 364 buffer_memory_full ();
365 365
366 BUF_PT (b) = 1; 366 BUF_PT (b) = BEG;
367 BUF_GPT (b) = 1; 367 BUF_GPT (b) = BEG;
368 BUF_BEGV (b) = 1; 368 BUF_BEGV (b) = BEG;
369 BUF_ZV (b) = 1; 369 BUF_ZV (b) = BEG;
370 BUF_Z (b) = 1; 370 BUF_Z (b) = BEG;
371 BUF_PT_BYTE (b) = 1; 371 BUF_PT_BYTE (b) = BEG_BYTE;
372 BUF_GPT_BYTE (b) = 1; 372 BUF_GPT_BYTE (b) = BEG_BYTE;
373 BUF_BEGV_BYTE (b) = 1; 373 BUF_BEGV_BYTE (b) = BEG_BYTE;
374 BUF_ZV_BYTE (b) = 1; 374 BUF_ZV_BYTE (b) = BEG_BYTE;
375 BUF_Z_BYTE (b) = 1; 375 BUF_Z_BYTE (b) = BEG_BYTE;
376 BUF_MODIFF (b) = 1; 376 BUF_MODIFF (b) = 1;
377 BUF_OVERLAY_MODIFF (b) = 1; 377 BUF_OVERLAY_MODIFF (b) = 1;
378 BUF_SAVE_MODIFF (b) = 1; 378 BUF_SAVE_MODIFF (b) = 1;
@@ -1155,9 +1155,9 @@ If BUFFER is omitted or nil, some interesting buffer is returned. */)
1155 } 1155 }
1156 tail = nconc2 (Fnreverse (add_ons), tail); 1156 tail = nconc2 (Fnreverse (add_ons), tail);
1157 1157
1158 for (; !NILP (tail); tail = Fcdr (tail)) 1158 for (; CONSP (tail); tail = XCDR (tail))
1159 { 1159 {
1160 buf = Fcdr (Fcar (tail)); 1160 buf = Fcdr (XCAR (tail));
1161 if (EQ (buf, buffer)) 1161 if (EQ (buf, buffer))
1162 continue; 1162 continue;
1163 if (SREF (XBUFFER (buf)->name, 0) == ' ') 1163 if (SREF (XBUFFER (buf)->name, 0) == ' ')
@@ -1302,9 +1302,9 @@ with SIGHUP. */)
1302 1302
1303 /* First run the query functions; if any query is answered no, 1303 /* First run the query functions; if any query is answered no,
1304 don't kill the buffer. */ 1304 don't kill the buffer. */
1305 for (list = Vkill_buffer_query_functions; !NILP (list); list = Fcdr (list)) 1305 for (list = Vkill_buffer_query_functions; CONSP (list); list = XCDR (list))
1306 { 1306 {
1307 tem = call0 (Fcar (list)); 1307 tem = call0 (XCAR (list));
1308 if (NILP (tem)) 1308 if (NILP (tem))
1309 return unbind_to (count, Qnil); 1309 return unbind_to (count, Qnil);
1310 } 1310 }
@@ -2004,7 +2004,7 @@ advance_to_char_boundary (byte_pos)
2004 2004
2005 if (byte_pos == BEG) 2005 if (byte_pos == BEG)
2006 /* Beginning of buffer is always a character boundary. */ 2006 /* Beginning of buffer is always a character boundary. */
2007 return 1; 2007 return BEG;
2008 2008
2009 c = FETCH_BYTE (byte_pos); 2009 c = FETCH_BYTE (byte_pos);
2010 if (! CHAR_HEAD_P (c)) 2010 if (! CHAR_HEAD_P (c))
@@ -4209,13 +4209,13 @@ call_overlay_mod_hooks (list, overlay, after, arg1, arg2, arg3)
4209 if (! after) 4209 if (! after)
4210 add_overlay_mod_hooklist (list, overlay); 4210 add_overlay_mod_hooklist (list, overlay);
4211 4211
4212 while (!NILP (list)) 4212 while (CONSP (list))
4213 { 4213 {
4214 if (NILP (arg3)) 4214 if (NILP (arg3))
4215 call4 (Fcar (list), overlay, after ? Qt : Qnil, arg1, arg2); 4215 call4 (XCAR (list), overlay, after ? Qt : Qnil, arg1, arg2);
4216 else 4216 else
4217 call5 (Fcar (list), overlay, after ? Qt : Qnil, arg1, arg2, arg3); 4217 call5 (XCAR (list), overlay, after ? Qt : Qnil, arg1, arg2, arg3);
4218 list = Fcdr (list); 4218 list = XCDR (list);
4219 } 4219 }
4220 UNGCPRO; 4220 UNGCPRO;
4221} 4221}