diff options
| -rw-r--r-- | lisp/window.el | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/lisp/window.el b/lisp/window.el index 8055e5babc0..bc2008e1d9c 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -8939,19 +8939,12 @@ For more details, see the documentation for `scroll-other-window'." | |||
| 8939 | Leave mark at previous position. | 8939 | Leave mark at previous position. |
| 8940 | With arg N, put point N/10 of the way from the true beginning." | 8940 | With arg N, put point N/10 of the way from the true beginning." |
| 8941 | (interactive "P") | 8941 | (interactive "P") |
| 8942 | (let ((orig-window (selected-window)) | 8942 | (with-selected-window (other-window-for-scrolling) |
| 8943 | (window (other-window-for-scrolling))) | 8943 | ;; Set point and mark in that window's buffer. |
| 8944 | ;; We use unwind-protect rather than save-window-excursion | 8944 | (with-no-warnings |
| 8945 | ;; because the latter would preserve the things we want to change. | 8945 | (beginning-of-buffer arg)) |
| 8946 | (unwind-protect | 8946 | ;; Set point accordingly. |
| 8947 | (progn | 8947 | (recenter '(t)))) |
| 8948 | (select-window window) | ||
| 8949 | ;; Set point and mark in that window's buffer. | ||
| 8950 | (with-no-warnings | ||
| 8951 | (beginning-of-buffer arg)) | ||
| 8952 | ;; Set point accordingly. | ||
| 8953 | (recenter '(t))) | ||
| 8954 | (select-window orig-window)))) | ||
| 8955 | 8948 | ||
| 8956 | (defun end-of-buffer-other-window (arg) | 8949 | (defun end-of-buffer-other-window (arg) |
| 8957 | "Move point to the end of the buffer in the other window. | 8950 | "Move point to the end of the buffer in the other window. |
| @@ -8959,15 +8952,10 @@ Leave mark at previous position. | |||
| 8959 | With arg N, put point N/10 of the way from the true end." | 8952 | With arg N, put point N/10 of the way from the true end." |
| 8960 | (interactive "P") | 8953 | (interactive "P") |
| 8961 | ;; See beginning-of-buffer-other-window for comments. | 8954 | ;; See beginning-of-buffer-other-window for comments. |
| 8962 | (let ((orig-window (selected-window)) | 8955 | (with-selected-window (other-window-for-scrolling) |
| 8963 | (window (other-window-for-scrolling))) | 8956 | (with-no-warnings |
| 8964 | (unwind-protect | 8957 | (end-of-buffer arg)) |
| 8965 | (progn | 8958 | (recenter '(t)))) |
| 8966 | (select-window window) | ||
| 8967 | (with-no-warnings | ||
| 8968 | (end-of-buffer arg)) | ||
| 8969 | (recenter '(t))) | ||
| 8970 | (select-window orig-window)))) | ||
| 8971 | 8959 | ||
| 8972 | (defvar mouse-autoselect-window-timer nil | 8960 | (defvar mouse-autoselect-window-timer nil |
| 8973 | "Timer used by delayed window autoselection.") | 8961 | "Timer used by delayed window autoselection.") |