2004-08-30 Daiki Ueno <ueno@unixuser.org>
+ * riece-options.el (riece-window-center-line): New user option.
+ * riece-misc.el (riece-insert): Check if the current point is not
+ visible in the window.
+
+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.
(insert (format-time-string "%H:%M") " " string)
(setq point (point))
(if (and (not (riece-frozen (current-buffer)))
- (setq window (get-buffer-window (current-buffer))))
+ (setq window (get-buffer-window (current-buffer)))
+ (not (pos-visible-in-window-p point window)))
(save-excursion ;save-selected-window changes
;current buffer
(save-selected-window
(select-window window)
(goto-char point) ;select-window changes current point
- (recenter -2))))
+ (recenter riece-window-center-line))))
(run-hook-with-args 'riece-after-insert-functions start (point))))
(setq buffers (cdr buffers))))
:type 'boolean
:group 'riece-looks)
+(defcustom riece-window-center-line -2
+ "Line number of center point in window when scrolling.
+If nil, erases the entire frame and then redraws with point in the
+center of the window. Negative means relative to bottom of window.
+See the document of the function `recenter'."
+ :type 'integer
+ :group 'riece-looks)
+
(defcustom riece-directory (expand-file-name "~/.riece")
"Where to look for data files."
:type 'directory