Commit e87f38ef authored by Jim Blandy's avatar Jim Blandy
Browse files

* buffer.c (list_buffers_1): Return the desired point.

	(Flist_buffers): Put point there in the buffer summary.
parent 1c7e6fbc
......@@ -1106,11 +1106,7 @@ list_buffers_1 (files)
current_buffer->read_only = Qt;
set_buffer_internal (old);
/* Foo. This doesn't work since temp_output_buffer_show sets point to 1
if (desired_point)
XBUFFER (Vstandard_output)->text.pointloc = desired_point;
return Qnil;
return make_number (desired_point);
DEFUN ("list-buffers", Flist_buffers, Slist_buffers, 0, 1, "P",
......@@ -1124,9 +1120,18 @@ The R column contains a % for buffers that are read-only.")
Lisp_Object files;
internal_with_output_to_temp_buffer ("*Buffer List*",
list_buffers_1, files);
return Qnil;
int count = specpdl_ptr - specpdl;
Lisp_Object desired_point;
desired_point =
internal_with_output_to_temp_buffer ("*Buffer List*",
list_buffers_1, files);
record_unwind_protect (save_excursion_restore, save_excursion_save ());
Fset_buffer (build_string ("*Buffer List*"));
SET_PT (XINT (desired_point));
return unbind_to (count, Qnil);
DEFUN ("kill-all-local-variables", Fkill_all_local_variables, Skill_all_local_variables,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment