diff options
| author | Jim Blandy | 1993-06-16 16:29:40 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-06-16 16:29:40 +0000 |
| commit | e87f38ef9d2301c681a7dcf876cceca747e7846f (patch) | |
| tree | 3e7a78316ce399914557ecbb0fb33bf21ccd8648 /src | |
| parent | 1c7e6fbca705b760d379b4ae8401850636cc3491 (diff) | |
| download | emacs-e87f38ef9d2301c681a7dcf876cceca747e7846f.tar.gz emacs-e87f38ef9d2301c681a7dcf876cceca747e7846f.zip | |
* buffer.c (list_buffers_1): Return the desired point.
(Flist_buffers): Put point there in the buffer summary.
Diffstat (limited to 'src')
| -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) | |||
| 1106 | 1106 | ||
| 1107 | current_buffer->read_only = Qt; | 1107 | current_buffer->read_only = Qt; |
| 1108 | set_buffer_internal (old); | 1108 | set_buffer_internal (old); |
| 1109 | /* Foo. This doesn't work since temp_output_buffer_show sets point to 1 | 1109 | return make_number (desired_point); |
| 1110 | if (desired_point) | ||
| 1111 | XBUFFER (Vstandard_output)->text.pointloc = desired_point; | ||
| 1112 | */ | ||
| 1113 | return Qnil; | ||
| 1114 | } | 1110 | } |
| 1115 | 1111 | ||
| 1116 | DEFUN ("list-buffers", Flist_buffers, Slist_buffers, 0, 1, "P", | 1112 | 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.") | |||
| 1124 | (files) | 1120 | (files) |
| 1125 | Lisp_Object files; | 1121 | Lisp_Object files; |
| 1126 | { | 1122 | { |
| 1127 | internal_with_output_to_temp_buffer ("*Buffer List*", | 1123 | int count = specpdl_ptr - specpdl; |
| 1128 | list_buffers_1, files); | 1124 | Lisp_Object desired_point; |
| 1129 | return Qnil; | 1125 | |
| 1126 | desired_point = | ||
| 1127 | internal_with_output_to_temp_buffer ("*Buffer List*", | ||
| 1128 | list_buffers_1, files); | ||
| 1129 | |||
| 1130 | record_unwind_protect (save_excursion_restore, save_excursion_save ()); | ||
| 1131 | Fset_buffer (build_string ("*Buffer List*")); | ||
| 1132 | SET_PT (XINT (desired_point)); | ||
| 1133 | |||
| 1134 | return unbind_to (count, Qnil); | ||
| 1130 | } | 1135 | } |
| 1131 | 1136 | ||
| 1132 | DEFUN ("kill-all-local-variables", Fkill_all_local_variables, Skill_all_local_variables, | 1137 | DEFUN ("kill-all-local-variables", Fkill_all_local_variables, Skill_all_local_variables, |