* riece-misc.el (riece-insert): Don't use 2nd argument WINDOW of
authorueno <ueno>
Mon, 30 Aug 2004 05:01:39 +0000 (05:01 +0000)
committerueno <ueno>
Mon, 30 Aug 2004 05:01:39 +0000 (05:01 +0000)
recenter since it is not supported by GNU Emacs.

lisp/ChangeLog
lisp/riece-misc.el

index 29c1be8..cd3e1bc 100644 (file)
@@ -1,5 +1,10 @@
 2004-08-30  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-misc.el (riece-insert): Don't use 2nd argument WINDOW of
+       recenter since it is not supported by GNU Emacs.
+
+2004-08-30  Daiki Ueno  <ueno@unixuser.org>
+
        * riece-misc.el (riece-insert): Use (recenter -1) to set window
        point instead of doing so manually.
 
index 543549f..d3e1936 100644 (file)
       (set-buffer (car buffers))
       (let ((inhibit-read-only t)
            buffer-read-only
-           (start (goto-char (point-max))))
+           (start (goto-char (point-max)))
+           (buffer (current-buffer))
+           window
+           point)
        (insert (format-time-string "%H:%M") " " string)
+       (setq point (point))
        (if (and (not (riece-frozen (current-buffer)))
-                (get-buffer-window (current-buffer)))
-           (recenter -1 (get-buffer-window (current-buffer))))
+                (setq window (get-buffer-window (current-buffer))))
+           (save-excursion
+             (save-selected-window
+               (select-window window)
+               (goto-char point)
+               (recenter -2))))
        (run-hook-with-args 'riece-after-insert-functions start (point))))
     (setq buffers (cdr buffers))))