diff options
| author | Deniz Dogan | 2011-09-03 19:40:08 +0200 |
|---|---|---|
| committer | Deniz Dogan | 2011-09-03 19:40:08 +0200 |
| commit | d37e5c877713210af39d81a7cf80335b79eae820 (patch) | |
| tree | d8cb87821dfbfef3963e7498157103e5c0abc6f2 | |
| parent | f3ada0eeb5a6011eafa45bdce9abea5db46d4939 (diff) | |
| download | emacs-d37e5c877713210af39d81a7cf80335b79eae820.tar.gz emacs-d37e5c877713210af39d81a7cf80335b79eae820.zip | |
* lisp/net/rcirc.el (rcirc-print): Simplify code for rcirc-scroll-show-maximum-output. There is no need to walk through all windows to find the right one.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/net/rcirc.el | 22 |
2 files changed, 16 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dae4cbf6609..656bf8485e9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-09-03 Deniz Dogan <deniz@dogan.se> | ||
| 2 | |||
| 3 | * net/rcirc.el (rcirc-print): Simplify code for | ||
| 4 | rcirc-scroll-show-maximum-output. There is no need to walk | ||
| 5 | through all windows to find the right one. | ||
| 6 | |||
| 1 | 2011-09-03 Christoph Scholtes <cschol2112@googlemail.com> | 7 | 2011-09-03 Christoph Scholtes <cschol2112@googlemail.com> |
| 2 | 8 | ||
| 3 | * help.el (help-return-method): Doc fix. | 9 | * help.el (help-return-method): Doc fix. |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 71b3fe0c4a1..06bbfb0b78c 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -1556,18 +1556,16 @@ record activity." | |||
| 1556 | 1556 | ||
| 1557 | ;; keep window on bottom line if it was already there | 1557 | ;; keep window on bottom line if it was already there |
| 1558 | (when rcirc-scroll-show-maximum-output | 1558 | (when rcirc-scroll-show-maximum-output |
| 1559 | (walk-windows (lambda (w) | 1559 | (let ((window (get-buffer-window))) |
| 1560 | (when (eq (window-buffer w) (current-buffer)) | 1560 | (when window |
| 1561 | (with-current-buffer (window-buffer w) | 1561 | (with-selected-window window |
| 1562 | (when (eq major-mode 'rcirc-mode) | 1562 | (when (eq major-mode 'rcirc-mode) |
| 1563 | (with-selected-window w | 1563 | (when (<= (- (window-height) |
| 1564 | (when (<= (- (window-height) | 1564 | (count-screen-lines (window-point) |
| 1565 | (count-screen-lines (window-point) | 1565 | (window-start)) |
| 1566 | (window-start)) | 1566 | 1) |
| 1567 | 1) | 1567 | 0) |
| 1568 | 0) | 1568 | (recenter -1))))))) |
| 1569 | (recenter -1))))))) | ||
| 1570 | nil t)) | ||
| 1571 | 1569 | ||
| 1572 | ;; flush undo (can we do something smarter here?) | 1570 | ;; flush undo (can we do something smarter here?) |
| 1573 | (buffer-disable-undo) | 1571 | (buffer-disable-undo) |