Mercurial > emacs
comparison src/editfns.c @ 2783:789c11177579
The text property routines can now modify buffers other
than the current one.
* insdel.c (modify_region): New argument BUFFER. Select that
buffer while we prepare for the modification, and switch back when
we're done.
* textprop.c (add_properties, remove_properties): Pass
the buffer being modified as the first argument to modify_region.
* editfns.c (Fsubst_char_in_region, Ftranslate_region): Pass the
current_buffer as the first argument to modify_region.
* casefiddle.c (casify_region): Same.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Fri, 14 May 1993 14:43:30 +0000 |
parents | 4a7e1c2a2a9e |
children | 37503f466755 |
comparison
equal
deleted
inserted
replaced
2782:683f4472f1c8 | 2783:789c11177579 |
---|---|
999 | 999 |
1000 pos = XINT (start); | 1000 pos = XINT (start); |
1001 stop = XINT (end); | 1001 stop = XINT (end); |
1002 look = XINT (fromchar); | 1002 look = XINT (fromchar); |
1003 | 1003 |
1004 modify_region (pos, stop); | 1004 modify_region (current_buffer, pos, stop); |
1005 if (! NILP (noundo)) | 1005 if (! NILP (noundo)) |
1006 { | 1006 { |
1007 if (MODIFF - 1 == current_buffer->save_modified) | 1007 if (MODIFF - 1 == current_buffer->save_modified) |
1008 current_buffer->save_modified++; | 1008 current_buffer->save_modified++; |
1009 if (MODIFF - 1 == current_buffer->auto_save_modified) | 1009 if (MODIFF - 1 == current_buffer->auto_save_modified) |
1049 size = XSTRING (table)->size; | 1049 size = XSTRING (table)->size; |
1050 tt = XSTRING (table)->data; | 1050 tt = XSTRING (table)->data; |
1051 | 1051 |
1052 pos = XINT (start); | 1052 pos = XINT (start); |
1053 stop = XINT (end); | 1053 stop = XINT (end); |
1054 modify_region (pos, stop); | 1054 modify_region (current_buffer, pos, stop); |
1055 | 1055 |
1056 cnt = 0; | 1056 cnt = 0; |
1057 for (; pos < stop; ++pos) | 1057 for (; pos < stop; ++pos) |
1058 { | 1058 { |
1059 oc = FETCH_CHAR (pos); | 1059 oc = FETCH_CHAR (pos); |