diff options
| author | Martin Rudalics | 2007-04-13 06:05:15 +0000 |
|---|---|---|
| committer | Martin Rudalics | 2007-04-13 06:05:15 +0000 |
| commit | c8286c2ca4712ba47ef802394fa776bb1c34e3c5 (patch) | |
| tree | f89ec499f561b7204dbf3171f952ca80eefaeae1 | |
| parent | dedecfd696051df3b709a20361b9a152ef4444a4 (diff) | |
| download | emacs-c8286c2ca4712ba47ef802394fa776bb1c34e3c5.tar.gz emacs-c8286c2ca4712ba47ef802394fa776bb1c34e3c5.zip | |
(edebug-pop-to-buffer): Don't select window marked as dedicated.
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/emacs-lisp/edebug.el | 46 |
2 files changed, 37 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index faee838050e..91aadbd0640 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2007-04-13 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * emacs-lisp/edebug.el (edebug-pop-to-buffer): Don't select | ||
| 4 | window marked as dedicated. | ||
| 5 | |||
| 6 | * mail/footnote.el (footnote-latin-string): New variable. | ||
| 7 | (footnote-latin-regexp): Redefined as regexp alternative. | ||
| 8 | (Footnote-latin): Use footnote-latin-string instead of | ||
| 9 | footnote-latin-regexp. | ||
| 10 | |||
| 1 | 2007-04-13 Glenn Morris <rgm@gnu.org> | 11 | 2007-04-13 Glenn Morris <rgm@gnu.org> |
| 2 | 12 | ||
| 3 | * tmm.el (tmm-get-keybind): Use car-safe to avoid errors with | 13 | * tmm.el (tmm-get-keybind): Use car-safe to avoid errors with |
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 151bbd2bd9e..9ae33599f09 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el | |||
| @@ -364,31 +364,39 @@ Return the result of the last expression in BODY." | |||
| 364 | 364 | ||
| 365 | (defun edebug-pop-to-buffer (buffer &optional window) | 365 | (defun edebug-pop-to-buffer (buffer &optional window) |
| 366 | ;; Like pop-to-buffer, but select window where BUFFER was last shown. | 366 | ;; Like pop-to-buffer, but select window where BUFFER was last shown. |
| 367 | ;; Select WINDOW if it provided and it still exists. Otherwise, | 367 | ;; Select WINDOW if it is provided and still exists. Otherwise, |
| 368 | ;; if buffer is currently shown in several windows, choose one. | 368 | ;; if buffer is currently shown in several windows, choose one. |
| 369 | ;; Otherwise, find a new window, possibly splitting one. | 369 | ;; Otherwise, find a new window, possibly splitting one. |
| 370 | (setq window (if (and (windowp window) (edebug-window-live-p window) | 370 | (setq window |
| 371 | (eq (window-buffer window) buffer)) | 371 | (cond |
| 372 | window | 372 | ((and (windowp window) (edebug-window-live-p window) |
| 373 | (if (eq (window-buffer (selected-window)) buffer) | 373 | (eq (window-buffer window) buffer)) |
| 374 | (selected-window) | 374 | window) |
| 375 | (edebug-get-buffer-window buffer)))) | 375 | ((eq (window-buffer (selected-window)) buffer) |
| 376 | (if window | 376 | ;; Selected window already displays BUFFER. |
| 377 | (select-window window) | 377 | (selected-window)) |
| 378 | (if (one-window-p) | 378 | ((edebug-get-buffer-window buffer)) |
| 379 | (split-window)) | 379 | ((one-window-p 'nomini) |
| 380 | ;; (message "next window: %s" (next-window)) (sit-for 1) | 380 | ;; When there's one window only, split it. |
| 381 | (if (eq (get-buffer-window edebug-trace-buffer) (next-window)) | 381 | (split-window)) |
| 382 | ;; Don't select trace window | 382 | ((let ((trace-window (get-buffer-window edebug-trace-buffer))) |
| 383 | nil | 383 | (catch 'found |
| 384 | (select-window (next-window)))) | 384 | (dolist (elt (window-list nil 'nomini)) |
| 385 | (set-window-buffer (selected-window) buffer) | 385 | (unless (or (eq elt (selected-window)) (eq elt trace-window) |
| 386 | (set-window-hscroll (selected-window) 0);; should this be?? | 386 | (window-dedicated-p elt)) |
| 387 | ;; Found a non-dedicated window not showing | ||
| 388 | ;; `edebug-trace-buffer', use it. | ||
| 389 | (throw 'found elt)))))) | ||
| 390 | ;; All windows are dedicated or show `edebug-trace-buffer', split | ||
| 391 | ;; selected one. | ||
| 392 | (t (split-window)))) | ||
| 393 | (select-window window) | ||
| 394 | (set-window-buffer window buffer) | ||
| 395 | (set-window-hscroll window 0);; should this be?? | ||
| 387 | ;; Selecting the window does not set the buffer until command loop. | 396 | ;; Selecting the window does not set the buffer until command loop. |
| 388 | ;;(set-buffer buffer) | 397 | ;;(set-buffer buffer) |
| 389 | ) | 398 | ) |
| 390 | 399 | ||
| 391 | |||
| 392 | (defun edebug-get-displayed-buffer-points () | 400 | (defun edebug-get-displayed-buffer-points () |
| 393 | ;; Return a list of buffer point pairs, for all displayed buffers. | 401 | ;; Return a list of buffer point pairs, for all displayed buffers. |
| 394 | (let (list) | 402 | (let (list) |