diff options
| author | Jim Blandy <jimb@redhat.com> | 1993-06-16 16:29:40 +0000 |
|---|---|---|
| committer | Jim Blandy <jimb@redhat.com> | 1993-06-16 16:29:40 +0000 |
| commit | e87f38ef9d2301c681a7dcf876cceca747e7846f (patch) | |
| tree | 3e7a78316ce399914557ecbb0fb33bf21ccd8648 | |
| parent | 1c7e6fbca705b760d379b4ae8401850636cc3491 (diff) | |
| download | emacs-e87f38ef9d2301c681a7dcf876cceca747e7846f.tar.gz | |
* buffer.c (list_buffers_1): Return the desired point.
(Flist_buffers): Put point there in the buffer summary.
| -rw-r--r-- | src/buffer.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/buffer.c b/src/buffer.c index ebfaca85e97..b19cfcaa737 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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.") (files) 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, |
