From: ueno Date: Mon, 30 Aug 2004 05:01:39 +0000 (+0000) Subject: * riece-misc.el (riece-insert): Don't use 2nd argument WINDOW of X-Git-Tag: riece-1_0_3~9 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=978124ac8f12e6aef4cdc386d7c170b2c48c76f1;p=elisp%2Friece.git * riece-misc.el (riece-insert): Don't use 2nd argument WINDOW of recenter since it is not supported by GNU Emacs. --- 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))))