Function: gnuplot--adjust-info-display
gnuplot--adjust-info-display is a natively compiled function defined
in gnuplot.el.
Signature
(gnuplot--adjust-info-display)
Documentation
Displays the *info* buffer in a window or frame.
Specified by the value of gnuplot-info-display.
If gnuplot-info-display is window, then the window will be
shrunk to the size of the info entry if it is smaller than half
the height of the frame.
The *info* buffer should already exist when this function is called.
Source Code
;; Defined in /nix/store/xvcy7r1jiw71avhnh6kmin403kpqrdhc-emacs-packages-deps/share/emacs/site-lisp/elpa/gnuplot-20260623.1111/gnuplot.el
(defun gnuplot--adjust-info-display ()
"Displays the *info* buffer in a window or frame.
Specified by the value of `gnuplot-info-display'.
If `gnuplot-info-display' is `window', then the window will be
shrunk to the size of the info entry if it is smaller than half
the height of the frame.
The *info* buffer should already exist when this function is
called."
(cl-case gnuplot-info-display
(window
(switch-to-buffer-other-window "*info*")
;; Adjust window height only if the frame is split
;; horizontally, so as not to mess up the minibuffer
;; we can't use shrink-window-if-larger-than-buffer here
;; because it doesn't work with Info mode's narrowing
(with-selected-window (get-buffer-window "*info*")
(unless (window-full-height-p)
(enlarge-window
(min (- (count-lines (point-min) (point-max)) (window-height) -1)
(- (/ (frame-height) 2) (window-height)))))))
(frame
(unless (frame-live-p gnuplot--info-frame)
(setq gnuplot--info-frame (make-frame)))
(select-frame gnuplot--info-frame)
(raise-frame gnuplot--info-frame)
(switch-to-buffer "*info*"))
(t
(switch-to-buffer "*info*"))))