Function: gnuplot-send-line-to-gnuplot

gnuplot-send-line-to-gnuplot is an interactive and natively compiled function defined in gnuplot.el.

Signature

(gnuplot-send-line-to-gnuplot)

Documentation

Sends the current line to the gnuplot program.

Respects continuation lines. This sets gnuplot-recently-sent to line.

Key Bindings

gnuplot-mode-map C-M-x gnuplot-mode-map C-c C-l

Source Code

;; Defined in /nix/store/xvcy7r1jiw71avhnh6kmin403kpqrdhc-emacs-packages-deps/share/emacs/site-lisp/elpa/gnuplot-20260623.1111/gnuplot.el
(defun gnuplot-send-line-to-gnuplot ()
  "Sends the current line to the gnuplot program.
Respects continuation lines.
This sets `gnuplot-recently-sent' to `line'."
  (interactive nil gnuplot-mode)
  (let (start end)
    (save-excursion
      ;; go to start of continued command, or beginning of line
      ;; if this is not a continuation of a previous line
      (gnuplot--beginning-of-continuation)
      (setq start (point))
      (end-of-line)
      (while (save-excursion
               (backward-char)
               (looking-at "\\\\"))      ; go to end of last continuation line
        (end-of-line 2))
      (beginning-of-line 2)
      (setq end (point)))
    (unless (string-match "\\`\\s-*\\'"
                          (buffer-substring-no-properties start end))
      (gnuplot-send-region-to-gnuplot start end 'line))
    end))