Lisp_Object Vmouse_leave_buffer_hook, Qmouse_leave_buffer_hook;
Lisp_Object Qlist;
-Lisp_Object preserved_fns;
+static Lisp_Object preserved_fns;
+
+/* Marker used within call-interactively to refer to point. */
+static Lisp_Object point_marker;
/* This comment supplies the doc string for interactive,
for make-docfile to see. We cannot put this in the real DEFUN
break;
case 'd': /* Value of point. Does not do I/O. */
- XSETFASTINT (args[i], point);
+ Fset_marker (point_marker, make_number (PT), Qnil);
+ args[i] = point_marker;
/* visargs[i] = Qnil; */
varies[i] = 1;
break;
case 'm': /* Value of mark. Does not do I/O. */
check_mark ();
/* visargs[i] = Qnil; */
- XSETFASTINT (args[i], marker_position (current_buffer->mark));
+ args[i] = current_buffer->mark;
varies[i] = 2;
break;
case 'r': /* Region, point and mark as 2 args. */
check_mark ();
+ Fset_marker (point_marker, make_number (PT), Qnil);
/* visargs[i+1] = Qnil; */
foo = marker_position (current_buffer->mark);
/* visargs[i] = Qnil; */
- XSETFASTINT (args[i], point < foo ? point : foo);
+ args[i] = point < foo ? point_marker : current_buffer->mark;
varies[i] = 3;
- XSETFASTINT (args[++i], point > foo ? point : foo);
+ args[++i] = point > foo ? point_marker : current_buffer->mark;
varies[i] = 4;
break;
{
visargs[0] = function;
for (i = 1; i < count + 1; i++)
- if (varies[i] > 0)
- visargs[i] = Fcons (intern (callint_argfuns[varies[i]]), Qnil);
- else
- visargs[i] = quotify_arg (args[i]);
+ {
+ if (varies[i] > 0)
+ visargs[i] = Fcons (intern (callint_argfuns[varies[i]]), Qnil);
+ else
+ visargs[i] = quotify_arg (args[i]);
+ }
Vcommand_history = Fcons (Flist (count + 1, visargs),
Vcommand_history);
}
+ /* If we used a marker to hold point, mark, or an end of the region,
+ temporarily, convert it to an integer now. */
+ for (i = 0; i++; i < count)
+ if (varies[i] >= 1 && varies[i] <= 4)
+ XSETINT (args[i], marker_position (args[i]));
+
{
Lisp_Object val;
specbind (Qcommand_debug_status, Qnil);
syms_of_callint ()
{
+ point_marker = Fmake_marker ();
+ staticpro (&point_marker);
+
preserved_fns = Fcons (intern ("region-beginning"),
Fcons (intern ("region-end"),
Fcons (intern ("point"),