Function: calc-graph-view
calc-graph-view is a byte-compiled function defined in
calc-graph.el.gz.
Signature
(calc-graph-view BUF OTHER-BUF NEED)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-graph.el.gz
(defun calc-graph-view (buf other-buf need)
(let (win)
(or calc-graph-no-auto-view
(if (setq win (get-buffer-window buf))
(or need
(and (eq buf calc-gnuplot-buffer)
(with-current-buffer buf
(not (pos-visible-in-window-p (point-max) win))))
(progn
(bury-buffer buf)
(bury-buffer other-buf)
(let ((curwin (selected-window)))
(select-window win)
(switch-to-buffer nil)
(select-window curwin))))
(if (setq win (get-buffer-window other-buf))
(set-window-buffer win buf)
(if (eq major-mode 'calc-mode)
(if (or need
(not (window-full-height-p)))
(display-buffer buf))
(switch-to-buffer buf)))))
(with-current-buffer buf
(if (and (eq buf calc-gnuplot-buffer)
(setq win (get-buffer-window buf))
(not (pos-visible-in-window-p (point-max) win)))
(progn
(goto-char (point-max))
(vertical-motion (- 6 (window-height win)))
(set-window-start win (point))
(goto-char (point-max)))))
(or calc-graph-no-auto-view (sit-for 0))))