Function: gnuplot--protect-prompt-fn

gnuplot--protect-prompt-fn is a natively compiled function defined in gnuplot.el.

Signature

(gnuplot--protect-prompt-fn STRING)

Documentation

Prevent the Gnuplot prompt from being deleted or overwritten.

STRING is the text as originally inserted in the comint buffer.

Source Code

;; Defined in /nix/store/xvcy7r1jiw71avhnh6kmin403kpqrdhc-emacs-packages-deps/share/emacs/site-lisp/elpa/gnuplot-20260623.1111/gnuplot.el
(defun gnuplot--protect-prompt-fn (_string)
  "Prevent the Gnuplot prompt from being deleted or overwritten.
STRING is the text as originally inserted in the comint buffer."
  (save-excursion
    (goto-char (point-max))
    (beginning-of-line)
    (let ((b (point)) e)
      (when (re-search-forward gnuplot--prompt-regexp (point-max) t)
        (setq e (point))
        (put-text-property b e 'rear-nonsticky '(read-only intangible face))
        (put-text-property b e 'intangible t)
        ;;(put-text-property b e 'read-only t)
        ))))