From 978124ac8f12e6aef4cdc386d7c170b2c48c76f1 Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 30 Aug 2004 05:01:39 +0000 Subject: [PATCH] * riece-misc.el (riece-insert): Don't use 2nd argument WINDOW of recenter since it is not supported by GNU Emacs. --- lisp/ChangeLog | 5 +++++ lisp/riece-misc.el | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 29c1be8..cd3e1bc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2004-08-30 Daiki Ueno + * 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 + * riece-misc.el (riece-insert): Use (recenter -1) to set window point instead of doing so manually. diff --git a/lisp/riece-misc.el b/lisp/riece-misc.el index 543549f..d3e1936 100644 --- a/lisp/riece-misc.el +++ b/lisp/riece-misc.el @@ -69,11 +69,19 @@ (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)))) -- 1.7.10.4