Function: calc-graph-set-command

calc-graph-set-command is a byte-compiled function defined in calc-graph.el.gz.

Signature

(calc-graph-set-command CMD &rest ARGS)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-graph.el.gz
(defun calc-graph-set-command (cmd &rest args)
  (calc-graph-init)
  (with-current-buffer calc-gnuplot-input
    (goto-char (point-min))
    (if (re-search-forward (concat "^set[ \t]+" cmd "[ \t\n]") nil t)
	(progn
	  (forward-char -1)
	  (end-of-line)
	  (let ((end (point)))
	    (beginning-of-line)
	    (delete-region (point) (1+ end))))
      (if (calc-graph-find-plot t t)
	  (if (eq (preceding-char) ?\n)
	      (forward-char -1))
	(goto-char (1- (point-max)))))
    (if (and args (car args))
	(progn
	  (or (bolp)
	      (insert "\n"))
	  (insert "set " (mapconcat 'identity (cons cmd args) " ") "\n"))))
  (calc-graph-view-commands))