]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/net/rcirc.el (rcirc-print): Simplify code for rcirc-scroll-show-maximum-output...
authorDeniz Dogan <deniz@dogan.se>
Sat, 3 Sep 2011 17:40:08 +0000 (19:40 +0200)
committerDeniz Dogan <deniz@dogan.se>
Sat, 3 Sep 2011 17:40:08 +0000 (19:40 +0200)
lisp/ChangeLog
lisp/net/rcirc.el

index dae4cbf66098a3f86c8f2a1b976c0dbda652e785..656bf8485e94da8718284d241f7017c180996ca0 100644 (file)
@@ -1,3 +1,9 @@
+2011-09-03  Deniz Dogan  <deniz@dogan.se>
+
+       * 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.
+
 2011-09-03  Christoph Scholtes  <cschol2112@googlemail.com>
 
        * help.el (help-return-method): Doc fix.
index 71b3fe0c4a189406721f4066c200683bafb47260..06bbfb0b78c6605c6e1c9d325c679779ef2c6b65 100644 (file)
@@ -1556,18 +1556,16 @@ record activity."
 
          ;; keep window on bottom line if it was already there
          (when rcirc-scroll-show-maximum-output
-           (walk-windows (lambda (w)
-                           (when (eq (window-buffer w) (current-buffer))
-                             (with-current-buffer (window-buffer w)
-                               (when (eq major-mode 'rcirc-mode)
-                                 (with-selected-window w
-                                   (when (<= (- (window-height)
-                                                (count-screen-lines (window-point)
-                                                                    (window-start))
-                                                1)
-                                             0)
-                                     (recenter -1)))))))
-                                 nil t))
+           (let ((window (get-buffer-window)))
+             (when window
+               (with-selected-window window
+                 (when (eq major-mode 'rcirc-mode)
+                   (when (<= (- (window-height)
+                                (count-screen-lines (window-point)
+                                                    (window-start))
+                                1)
+                             0)
+                     (recenter -1)))))))
 
          ;; flush undo (can we do something smarter here?)
          (buffer-disable-undo)