[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running Guile through Emacs

From: thi
Subject: Re: Running Guile through Emacs
Date: Sat, 13 Jan 2001 02:20:15 -0800

more convenience elisp...


;;; ID: run-guile.el,v 1.19 2000/09/12 18:56:25 ttn Rel
;;; Copyright (C) 1997-2000 Thien-Thi Nguyen
;;; This file is part of ttn's personal elisp library, released under GNU
;;; GPL with ABSOLUTELY NO WARRANTY.  See the file COPYING for details.

;;; Description: Provide `run-guile' and friends.

(defun run-like-scheme (program &optional edit-cmd-p prompt)
  "Run an inferior interpreter PROGRAM using `run-scheme'.
The variable `scheme-buffer' is set to the new buffer."
  (let ((scheme-program-name
         (or (when (and edit-cmd-p (not noninteractive))
               (read-string (or prompt "Program: ") program))
    (run-scheme scheme-program-name)
    (setq scheme-buffer (rename-buffer (format "*%s*" scheme-program-name)))
    (local-set-key "\C-h\C-g" '(lambda (s)
                                 (interactive "sGuile help: ")
                                 (insert "(help " s ")")

(defun run-guile (&optional edit-cmd-p)
  "Run an inferior guile process using `run-like-scheme'."
  (interactive "P")
  (run-like-scheme "guile" edit-cmd-p "Run Guile: "))

(defun run-guile-tcltk (&optional edit-cmd-p)
  "Run an inferior guile-tcltk process using `run-like-scheme'."
  (interactive "P")
  (run-like-scheme "guile-tcltk" edit-cmd-p "Run Guile-TclTk: "))

(defun run-guile-gtk (&optional edit-cmd-p)
  "Run an inferior guile-gtk process using `run-like-scheme'."
  (interactive "P")
  (run-like-scheme "guile-gtk" edit-cmd-p "Run Guile-GTK: "))

(defun run-guile-pgsql (&optional edit-cmd-p)
  "Run an inferior guile-pgsql process using `run-like-scheme'."
  (interactive "P")
  (run-like-scheme "guile-pgsql" edit-cmd-p "Run Guile-PGSQL: "))

(defun run-guile-pg (&optional edit-cmd-p)
  "Run an inferior guile-pg process using `run-like-scheme'."
  (interactive "P")
  (run-like-scheme "guile-pg" edit-cmd-p "Run Guile-PG: "))

(defun run-guile-oops (&optional edit-cmd-p)
  "Run an inferior guile-oops process using `run-like-scheme'."
  (interactive "P")
  (run-like-scheme "guile-oops" edit-cmd-p "Run GOOPS: "))

(provide 'run-guile)

;;; run-guile.el,v1.19 ends here

reply via email to

[Prev in Thread] Current Thread [Next in Thread]