(with-current-buffer (car buffers)
(let ((inhibit-read-only t)
buffer-read-only
- (start (goto-char (point-max)))
+ start
window
point)
- (insert (format-time-string "%H:%M") " " string)
- (setq point (point))
+ ;; Save the current for the case when (car buffers) is the
+ ;; currently selected buffer.
+ (save-excursion
+ (setq start (goto-char (point-max)))
+ (insert (format-time-string "%H:%M") " " string)
+ (setq point (point)))
(if (and (not (riece-frozen (current-buffer)))
(setq window (get-buffer-window (current-buffer)))
(not (pos-visible-in-window-p point window)))