MIT Scheme Development on Ubuntu

  1. sudo apt-get mit-scheme;code

  2. run "scheme" then you enter the command line scheme repl;get

  3. sudo apt-get emacs;input

  4. modify "(setq scheme-program-name "scm")" in .emacs to "(setq scheme-program-name "scheme")", because our scheme command is "scheme";emacs

  5. install quack with apt-get install emacs-goodies-el;it

  6. open emacs and create a new buffer with "C-x C-f myfile.scm";file

  7. input following code:command

(define (mydouble x) (+ (* x 2) 10))tutorial

  1. save file: C-x C-s;top

  2. split window: C-x 2;di

  3. switch to bottom window: C-x o;

  4. start scheme repl at bottom window: M-x run-scheme

  5. switch back to top window: C-x o;

  6. parse code: C-x C-e;

  7. switch back to bottom window(C-x o) and run "(mydouble 3)", you got 16;

  8. modify source file in upper window and parse it again (C-x C-e);

  9. run "(mydouble 3)" again, now you get another value;

Ref: A tutorial for using Emacs with Scheme

相關文章
相關標籤/搜索