[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/windmove.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/windmove.el |
Date: |
Tue, 03 Jun 2003 07:09:56 -0400 |
Index: emacs/lisp/windmove.el
diff -c emacs/lisp/windmove.el:1.5 emacs/lisp/windmove.el:1.6
*** emacs/lisp/windmove.el:1.5 Tue May 7 12:37:01 2002
--- emacs/lisp/windmove.el Tue Jun 3 07:09:56 2003
***************
*** 321,334 ****
bottom-right corner of the frame.
For example, if a frame has 76 rows and 181 columns, the return value
from `windmove-frame-edges' will be the list (0 0 180 75)."
! (let ((frame (if window
! (window-frame window)
! (selected-frame))))
! (let ((x-min 0)
! (y-min 0)
! (x-max (1- (frame-width frame))) ; 1- for last row & col here
! (y-max (1- (frame-height frame))))
! (list x-min y-min x-max y-max))))
;; it turns out that constraining is always a good thing, even when
;; wrapping is going to happen. this is because:
--- 321,335 ----
bottom-right corner of the frame.
For example, if a frame has 76 rows and 181 columns, the return value
from `windmove-frame-edges' will be the list (0 0 180 75)."
! (let* ((frame (if window
! (window-frame window)
! (selected-frame)))
! (top-left (window-inside-edges (frame-first-window frame)))
! (x-min (nth 0 top-left))
! (y-min (nth 1 top-left))
! (x-max (+ x-min (frame-width frame) -1)) ; 1- for last row & col
! (y-max (+ x-max (frame-height frame) -1)))
! (list x-min y-min x-max y-max)))
;; it turns out that constraining is always a good thing, even when
;; wrapping is going to happen. this is because:
***************
*** 453,467 ****
top-left or bottom-right corner of the selected window, or WINDOW if
supplied, if ARG is greater or smaller than zero, respectively."
(let ((effective-arg (if (null arg) 0 (prefix-numeric-value arg)))
! (edges (window-edges window)))
(let ((top-left (cons (nth 0 edges)
(nth 1 edges)))
! ;; if 1-'s are not there, windows actually extend too far.
! ;; actually, -2 is necessary for bottom: (nth 3 edges) is
! ;; the height of the window; -1 because we want 0-based max,
! ;; -1 to get rid of mode line
(bottom-right (cons (- (nth 2 edges) 1)
! (- (nth 3 edges) 2))))
(cond
((> effective-arg 0)
top-left)
--- 454,466 ----
top-left or bottom-right corner of the selected window, or WINDOW if
supplied, if ARG is greater or smaller than zero, respectively."
(let ((effective-arg (if (null arg) 0 (prefix-numeric-value arg)))
! (edges (window-inside-edges window)))
(let ((top-left (cons (nth 0 edges)
(nth 1 edges)))
! ;; Subtracting 1 converts the edge to the last column or line
! ;; within the window.
(bottom-right (cons (- (nth 2 edges) 1)
! (- (nth 3 edges) 1))))
(cond
((> effective-arg 0)
top-left)
***************
*** 531,540 ****
If no window is at direction DIR, an error is signaled."
(let ((other-window (windmove-find-other-window dir arg window)))
(cond ((null other-window)
! (error "No window at %s" dir))
((and (window-minibuffer-p other-window)
(not (minibuffer-window-active-p other-window)))
! (error "Can't move to inactive minibuffer"))
(t
(select-window other-window)))))
--- 530,539 ----
If no window is at direction DIR, an error is signaled."
(let ((other-window (windmove-find-other-window dir arg window)))
(cond ((null other-window)
! (error "No window %s from selected window" dir))
((and (window-minibuffer-p other-window)
(not (minibuffer-window-active-p other-window)))
! (error "Minibuffer is inactive"))
(t
(select-window other-window)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/windmove.el,
Richard M. Stallman <=