File: LISP-tutorial-25.html

package info (click to toggle)
cmucl 20c-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 42,524 kB
  • sloc: lisp: 358,331; ansic: 28,385; asm: 3,777; sh: 1,236; makefile: 366; csh: 31
file content (51 lines) | stat: -rw-r--r-- 1,924 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<HTML>
<HEAD>
<TITLE>Common LISP Hints: Getting Started with Emacs</TITLE>
</HEAD>
<BODY>
<A HREF="LISP-tutorial-24.html"><IMG SRC="prev.gif" ALT="Previous"></A>
<IMG SRC="next.gif" ALT="Next">
<A HREF="LISP-tutorial.html#toc25"><IMG SRC="toc.gif" ALT="Contents"></A>
<HR>
<H2><A NAME="s25">25. Getting Started with Emacs</A></H2>

<P>You can use Emacs to edit LISP code: most Emacses are set up to enter
LISP mode automatically when they find a file which ends in .lisp, but
if yours isn't, you can type <CODE>M-x lisp-mode</CODE>. M-x means: meta-key
plus x. If there is a meta (or ALT) key try it. If this fails M-x can
be typed by typing ESC followed by x. If your keyboard lacks an ESC
key, curse DEC, and type control-[ followed by x.</P>
<P>You can run LISP under Emacs, too: make sure that there is a command in
your path called "lisp" which runs your favorite LISP. For example, you
could type</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
ln -s /usr/local/bin/clisp ~/bin/lisp
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>This isn't needed in CMUCL. Lisp is called lisp there.</P>
<P>Then in Emacs type <CODE>M-x run-lisp</CODE>. You can send LISP code to the LISP you
just started, and do all sorts of other cool things; for more
information, type <CODE>C-h m</CODE> from any buffer which is in LISP
mode. This means: press control <EM>and</EM> h, release both and press m.</P>
<P>Actually, you don't even need to make a link. Emacs has a variable
called inferior-lisp-program; so if you add the line</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
(setq inferior-lisp-program &quot;/usr/local/bin/clisp&quot;)
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>to your .emacs file, Emacs will know where to find CLISP when
you type <CODE>M-x run-lisp</CODE>.</P>


<HR>
<A HREF="LISP-tutorial-24.html"><IMG SRC="prev.gif" ALT="Previous"></A>
<IMG SRC="next.gif" ALT="Next">
<A HREF="LISP-tutorial.html#toc25"><IMG SRC="toc.gif" ALT="Contents"></A>
</BODY>
</HTML>