Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
f16a1ed3
Commit
f16a1ed3
authored
Aug 11, 1993
by
Richard M. Stallman
Browse files
(Frecenter): Preserve point in the buffer we change it in.
parent
0d94f5ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
src/window.c
src/window.c
+10
-3
No files found.
src/window.c
View file @
f16a1ed3
...
...
@@ -1310,13 +1310,19 @@ If FRAME is a frame, search only that frame.\n")
DEFUN ("delete-other-windows", Fdelete_other_windows, Sdelete_other_windows,
0, 1, "",
"Make WINDOW (or the selected window) fill its frame.\n\
Only the frame WINDOW is on is affected."
)
Only the frame WINDOW is on is affected.\n\
This function tries to reduce display jumps\n\
by keeping the text previously visible in WINDOW\n\
in the same place on the frame. Doing this depends on\n\
the value of (window-start WINDOW), so if calling this function\n\
in a program gives strange scrolling, make sure the window-start\n\
value is reasonable when this function is called.")
(window)
Lisp_Object window;
{
struct window *w;
int
opoint
=
point
;
struct buffer *obuf = current_buffer;
int opoint;
int top;
if (NILP (window))
...
...
@@ -1330,11 +1336,12 @@ Only the frame WINDOW is on is affected.")
window_loop (DELETE_OTHER_WINDOWS, window, 0, WINDOW_FRAME (w));
Fset_buffer (w->buffer);
opoint = point;
SET_PT (marker_position (w->start));
Frecenter (make_number (top - FRAME_MENU_BAR_LINES (XFRAME (WINDOW_FRAME (w)))));
set_buffer_internal
(
obuf
);
SET_PT (opoint);
set_buffer_internal (obuf);
return Qnil;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment