How to choose which circuit to use for emacs?

I have the following code in ~ / .emacs to run a circuit (gosh and mit-scheme).

;(setq scheme-program-name "gosh -i")
(setq scheme-program-name "mit-scheme")
(autoload 'scheme-mode "cmuscheme" "Major mode for scheme." t)
(autoload 'run-scheme "cmuscheme" "Run an inferior scheme process." t)

(defun scheme-other-window ()
 "Run scheme on other window"
 (interactive)
 (switch-to-buffer-other-window
  (get-buffer-create "*scheme*"))
 (run-scheme scheme-program-name))

(define-key global-map
  "\C-cs" 'scheme-other-window)

Cc s starts the schema along the REPL path specified in the 'schem-program-name', and I select the schema to use by commenting on one or the other.

Is there a better way than this? I mean, can I choose which circuit to use with "Mx" or something else?

+3
source share
3 answers

If you call run-schemewith the prefix argument, it will ask you which circuit you want to run - you can fake it by running it with

(let ((current-prefix-arg 1)) (call-interactively 'run-scheme))
+5
source

quack.el, , , , Eli .

(defun scheme-other-window ()
  "Run scheme on another window"
  (interactive)
  (switch-to-buffer-other-window
   (get-buffer-create "*scheme*"))
  ;; This causes run-scheme to act as if C-u had been entered before it was called.
  (let ((current-prefix-arg 1)) 
    (call-interactively 'run-scheme)))
+2

quack.el- Scheme , .

+1
source

Source: https://habr.com/ru/post/1761344/


All Articles