DEFUN ("point-min", Fpoint_min, Spoint_min, 0, 0, 0,
"Return the minimum permissible value of point in the current buffer.\n\
-This is 1, unless a clipping restriction is in effect.")
+This is 1, unless narrowing (a buffer restriction) is in effect.")
()
{
Lisp_Object temp;
DEFUN ("point-min-marker", Fpoint_min_marker, Spoint_min_marker, 0, 0, 0,
"Return a marker to the minimum permissible value of point in this buffer.\n\
-This is the beginning, unless a clipping restriction is in effect.")
+This is the beginning, unless narrowing (a buffer restriction) is in effect.")
()
{
return buildmark (BEGV);
DEFUN ("point-max", Fpoint_max, Spoint_max, 0, 0, 0,
"Return the maximum permissible value of point in the current buffer.\n\
-This is (1+ (buffer-size)), unless a clipping restriction is in effect,\n\
-in which case it is less.")
+This is (1+ (buffer-size)), unless narrowing (a buffer restriction)\n\
+is in effect, in which case it is less.")
()
{
Lisp_Object temp;
DEFUN ("point-max-marker", Fpoint_max_marker, Spoint_max_marker, 0, 0, 0,
"Return a marker to the maximum permissible value of point in this buffer.\n\
-This is (1+ (buffer-size)), unless a clipping restriction is in effect,\n\
-in which case it is less.")
+This is (1+ (buffer-size)), unless narrowing (a buffer restriction)\n\
+is in effect, in which case it is less.")
()
{
return buildmark (ZV);
make_buffer_string (start, end)
int start, end;
{
- Lisp_Object result;
+ Lisp_Object result, tem;
if (start < GPT && GPT < end)
move_gap (start);
result = make_uninit_string (end - start);
bcopy (&FETCH_CHAR (start), XSTRING (result)->data, end - start);
- /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */
- copy_intervals_to_string (result, current_buffer, start, end - start);
+ tem = Fnext_property_change (make_number (start), Qnil, make_number (end));
+
+#ifdef USE_TEXT_PROPERTIES
+ if (XINT (tem) != end)
+ copy_intervals_to_string (result, current_buffer, start, end - start);
+#endif
return result;
}
/* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */
graft_intervals_into_buffer (copy_intervals (bp->intervals, start, len),
- opoint, bp, 0);
+ opoint, len, current_buffer, 0);
return Qnil;
}
Lisp_Object start, end, fromchar, tochar, noundo;
{
register int pos, stop, look;
+ int changed = 0;
validate_region (&start, &end);
CHECK_NUMBER (fromchar, 2);
stop = XINT (end);
look = XINT (fromchar);
- modify_region (current_buffer, pos, stop);
if (! NILP (noundo))
{
if (MODIFF - 1 == current_buffer->save_modified)
{
if (FETCH_CHAR (pos) == look)
{
+ if (! changed)
+ {
+ modify_region (current_buffer, XINT (start), stop);
+ changed = 1;
+ }
+
if (NILP (noundo))
record_change (pos, 1);
FETCH_CHAR (pos) = XINT (tochar);
- if (NILP (noundo))
- signal_after_change (pos, 1, 1);
}
pos++;
}
+ if (changed)
+ signal_after_change (XINT (start),
+ stop - XINT (start), stop - XINT (start));
+
return Qnil;
}