;;; -*- lexical-binding: t -*- ;; ;; this file: ;; https://dataswamp.org/~incal/emacs-init/ny.el ;; ;; original commands/docstrings: ;; https://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/examples/emacs/how-to/init-nyquist.html ;; ;; all Nyquist files: ;; https://dataswamp.org/~incal/ny/ (require 'inf-lisp) (let*((ny-buff "*Nyquist*") (ny-proc "inferior-lisp") (inferior-lisp-buffer ny-buff) ) (defun ny-running-p () "Return non-nil iff a Nyquist process is running." (get-process ny-proc) ) (declare-function ny-running-p nil) (defun ny-start () "Start a new Nyquist process." (run-lisp "/bin/ny") (switch-to-buffer (format "*%s*" ny-proc)) (rename-buffer ny-buff) (setq inferior-lisp-buffer ny-buff) ) (declare-function ny-start nil) (defun ny-kill () "Kill the Nyquist process and buffer." (when (get-buffer ny-buff) (kill-buffer ny-buff) ) (when (processp ny-proc) (delete-process ny-proc) )) (declare-function ny-kill nil) (defun ny () "Start Nyquist if not running, switch to its buffer." (interactive) (if (and (ny-running-p) (get-buffer ny-buff) ) (switch-to-buffer ny-buff) (ny-kill) (ny-start) )) (declare-function ny nil) ) (provide 'ny)