aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-25 18:58:42 +0000
committerRichard M. Stallman1994-06-25 18:58:42 +0000
commit3aef9604ce850fbbe44374835ebb4ad05b52a780 (patch)
tree4386004fe29aeb1a0df8102e0e103cc396c34ca0
parent2ffa6186965c268f10f8132423a5c32c06e79b53 (diff)
downloademacs-3aef9604ce850fbbe44374835ebb4ad05b52a780.tar.gz
emacs-3aef9604ce850fbbe44374835ebb4ad05b52a780.zip
(beginning-of-buffer-other-window)
(end-of-buffer-other-window): New functions.
-rw-r--r--lisp/simple.el33
1 files changed, 33 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 65742b68c6f..f87016aa4f7 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1705,6 +1705,39 @@ If this is zero, point is always centered after it moves off frame.")
1705 (if (eq lines '-) nil 1705 (if (eq lines '-) nil
1706 (if (null lines) '- 1706 (if (null lines) '-
1707 (- (prefix-numeric-value lines)))))) 1707 (- (prefix-numeric-value lines))))))
1708
1709(defun beginning-of-buffer-other-window (arg)
1710 "Move point to the beginning of the buffer in the other window.
1711Leave mark at previous position.
1712With arg N, put point N/10 of the way from the true beginning."
1713 (interactive "P")
1714 (let ((orig-window (selected-window))
1715 (window (other-window-for-scrolling)))
1716 ;; We use unwind-protect rather than save-window-excursion
1717 ;; because the latter would preserve the things we want to change.
1718 (unwind-protect
1719 (progn
1720 (select-window window)
1721 ;; Set point and mark in that window's buffer.
1722 (beginning-of-buffer arg)
1723 ;; Set point accordingly.
1724 (recenter '(t)))
1725 (select-window orig-window))))
1726
1727(defun end-of-buffer-other-window (arg)
1728 "Move point to the end of the buffer in the other window.
1729Leave mark at previous position.
1730With arg N, put point N/10 of the way from the true end."
1731 (interactive "P")
1732 ;; See beginning-of-buffer-other-window for comments.
1733 (let ((orig-window (selected-window))
1734 (window (other-window-for-scrolling)))
1735 (unwind-protect
1736 (progn
1737 (select-window window)
1738 (beginning-of-buffer arg)
1739 (recenter '(t)))
1740 (select-window orig-window))))
1708 1741
1709(defun transpose-chars (arg) 1742(defun transpose-chars (arg)
1710 "Interchange characters around point, moving forward one character. 1743 "Interchange characters around point, moving forward one character.