diff options
| author | Gerd Moellmann | 2000-07-03 09:10:44 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-07-03 09:10:44 +0000 |
| commit | 90601de977560fa533fc80a7f299857d33869a95 (patch) | |
| tree | 42bb2c690b67b57071592f0a5cc55fd57ce78a70 /lisp/textmodes | |
| parent | 831a6cb01c5b5159f8559a22fd7025f659ebb35f (diff) | |
| download | emacs-90601de977560fa533fc80a7f299857d33869a95.tar.gz emacs-90601de977560fa533fc80a7f299857d33869a95.zip | |
(refer-find-entry-internal): Use some-window
instead of cycling through windows with next-window.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/refer.el | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/lisp/textmodes/refer.el b/lisp/textmodes/refer.el index 6d710e8d8b5..92b18a01b7b 100644 --- a/lisp/textmodes/refer.el +++ b/lisp/textmodes/refer.el | |||
| @@ -195,21 +195,19 @@ found on the last refer-find-entry or refer-find-next-entry." | |||
| 195 | ;; find window in which to display bibliography file. | 195 | ;; find window in which to display bibliography file. |
| 196 | ;; if a bibliography file is already displayed in a window, use | 196 | ;; if a bibliography file is already displayed in a window, use |
| 197 | ;; that one, otherwise use any window other than the current one | 197 | ;; that one, otherwise use any window other than the current one |
| 198 | (while (not found) | 198 | (setq new-window |
| 199 | (while (and (not (null (setq file (nth n files)))) | 199 | (some-window (lambda (w) |
| 200 | (setq n (1+ n)) | 200 | (while (and (not (null (setq file (nth n files)))) |
| 201 | (not (string-equal file | 201 | (setq n (1+ n)) |
| 202 | (buffer-file-name | 202 | (not (string-equal file |
| 203 | (window-buffer new-window)))))) | 203 | (buffer-file-name |
| 204 | (setq found | 204 | (window-buffer w)))))) |
| 205 | (if (null file) | 205 | file))) |
| 206 | (eq (setq new-window (next-window new-window 'nomini)) | 206 | (unless new-window |
| 207 | old-window) | 207 | ;; didn't find bib file in any window: |
| 208 | 't))) | 208 | (when (one-window-p 'nomini) |
| 209 | (if (null file) ; didn't find bib file in any window: | 209 | (setq old-window (split-window))) |
| 210 | (progn (if (one-window-p 'nomini) | 210 | (setq new-window (next-window old-window 'nomini))) |
| 211 | (setq old-window (split-window))) | ||
| 212 | (setq new-window (next-window old-window 'nomini)))) | ||
| 213 | (select-window (if refer-same-file | 211 | (select-window (if refer-same-file |
| 214 | old-window | 212 | old-window |
| 215 | new-window)) ; the window in which to show the bib file | 213 | new-window)) ; the window in which to show the bib file |