aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-07-03 09:12:12 +0000
committerGerd Moellmann2000-07-03 09:12:12 +0000
commite940c6dabf50b2180c75ea57fbc82671adc3d293 (patch)
tree060b85b0ac2c06333dfec243881289248b1ab8a2
parentd8aa822b225aa8802df4527426fc59d6272dc149 (diff)
downloademacs-e940c6dabf50b2180c75ea57fbc82671adc3d293.tar.gz
emacs-e940c6dabf50b2180c75ea57fbc82671adc3d293.zip
(edebug-window-live-p, edebug-window-list)
(edebug-get-displayed-buffer-points): Use walk-windows/some-window instead of cycling through windows with next-window.
-rw-r--r--lisp/emacs-lisp/edebug.el33
1 files changed, 10 insertions, 23 deletions
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 9533da37f66..fc2a1d5f58e 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -327,22 +327,13 @@ A lambda list keyword is a symbol that starts with `&'."
327(defun edebug-window-list () 327(defun edebug-window-list ()
328 "Return a list of windows, in order of `next-window'." 328 "Return a list of windows, in order of `next-window'."
329 ;; This doesn't work for epoch. 329 ;; This doesn't work for epoch.
330 (let* ((first-window (selected-window)) 330 (let (window-list)
331 (window-list (list first-window)) 331 (walk-windows (lambda (w) (setq window-list (cons w window-list))))
332 (next (next-window first-window)))
333 (while (not (eq next first-window))
334 (setq window-list (cons next window-list))
335 (setq next (next-window next)))
336 (nreverse window-list))) 332 (nreverse window-list)))
337 333
338(defun edebug-window-live-p (window) 334(defun edebug-window-live-p (window)
339 "Return non-nil if WINDOW is visible." 335 "Return non-nil if WINDOW is visible."
340 (let* ((first-window (selected-window)) 336 (some-window (lambda (w) (eq w window))))
341 (next (next-window first-window t)))
342 (while (not (or (eq next window)
343 (eq next first-window)))
344 (setq next (next-window next t)))
345 (eq next window)))
346 337
347;; Not used. 338;; Not used.
348'(defun edebug-two-window-p () 339'(defun edebug-two-window-p ()
@@ -433,17 +424,13 @@ Return the result of the last expression in BODY."
433 424
434(defun edebug-get-displayed-buffer-points () 425(defun edebug-get-displayed-buffer-points ()
435 ;; Return a list of buffer point pairs, for all displayed buffers. 426 ;; Return a list of buffer point pairs, for all displayed buffers.
436 (save-excursion 427 (let (list)
437 (let* ((first-window (selected-window)) 428 (walk-windows (lambda (w)
438 (next (next-window first-window)) 429 (unless (eq w (selected-window))
439 (buffer-point-list nil) 430 (setq list (cons (cons (window-buffer w)
440 buffer) 431 (window-point w))
441 (while (not (eq next first-window)) 432 list)))))
442 (set-buffer (setq buffer (window-buffer next))) 433 list))
443 (setq buffer-point-list
444 (cons (cons buffer (point)) buffer-point-list))
445 (setq next (next-window next)))
446 buffer-point-list)))
447 434
448 435
449(defun edebug-set-buffer-points (buffer-points) 436(defun edebug-set-buffer-points (buffer-points)