|
|||||||||||||
|
|
|
|
|
|
|
|
|
||||||
|
|
|||||||||||||
![]() ![]() ![]() ![]() ![]() ![]() |
GNU Emacs on Windows
NOTE: GNU Emacs does not work well on 64-bit Windows.
Emacs will crash when [Information on SLIME can be obtained here.] We have packaged the standard gnu.org GNU Emacs 22.1 binaries into a downloadable installer for easy installation of GNU Emacs 22.1 on Microsoft Windows. The installer above is merely a repackaging of the gnu.org binaries (downloaded from ftp://ftp.gnu.org/pub/gnu/emacs/windows/emacs-22.1-bin-i386.zip ). We did not compile nor change in any way the GNU Emacs 22.1 binaries. We offer this repackaging in the hope that people find it easier to install. The GNU Emacs Installer provides a simple means of installing Emacs and creating the Start Menu shortcuts for starting it. The installer also creates an uninstallation utility for quick and easy uninstallation of Emacs if you wish to remove it. If the installer detects an installation of Allegro CL, it will also look for the Emacs initialization file .emacs and ask if you would like to add sample code for loading the Franz Inc. Emacs-Lisp interface. This code will be added to the file as comments, which you may uncomment in order to have the code take affect. If no .emacs file exists (or is found) the installer will ask if it can create one. The installer was created with NSIS using install.nsi and makefile. You can read more about how to build the GNU Emacs installer here. GNU Emacs on UNIXGNU Emacs for UNIX platforms are available from http://www.gnu.org. We do not suuply an installer for GNU Emacs on UNIX platfoms. On that site, see in particular http:///directory.fsf.org/GNU/emacs.html. Using the GNU Emacs-Allegro Common Lisp InterfaceIn order to use the Emacs-Lisp interface, you must load the necessary code into Emacs. The file to load is [Allegro directory]/eli/fi-site-init.el]. On Windows, the standard [Allegro directory] is c:/Program Files/acl81/ (on UNIX, it is /usr/local/acl81/). To load the file, you can evaluate the following form in the Emacs *scratch* buffer: For Windows(load "C:/Program Files/acl81/eli/fi-site-init.el") Control-J For UNIX(load "/usr/local/acl81/eli/fi-site-init.el") Control-J Pressing Control-J in the *scratch* buffer causes a form to be evaluated by Emacs (a simple carriage-return does not do that). But rather than evaluating that form each time you run Emacs, it is better to have a .emacs file that includes that form. The .emacs file is loaded into Emacs whenever Emacs is started. The standard location on Windows for a .emacs file is C:\, that is, the top-level directory on the C drive. (If you have a home directory, the .emacs should go there. Having a home directory on Windows is optional and many Windows users do not have one. Presumably, if you have one, you know it.) The Emacs installer described above asks if you want a .emacs file installed. If you answered yes, the file C:\.emacs is created with the following contents (the directory where Allegro CL was installed -- C:/Program Files/acl81/ -- appears in several lines; that value was determined by searching for the location and if you installed in a different location, the different location should appear): ; This is sample code for starting and specifying defaults to the ; Emacs-Lisp interface. Uncomment this code if you want the ELI ; to load automatically when you start emacs. ; (push "C:/Program Files/acl81/eli" load-path) ; (load "fi-site-init.el") ; ; (setq fi:common-lisp-image-name "C:/Program Files/acl81/mlisp.exe") ; (setq fi:common-lisp-image-file "C:/Program Files/acl81/mlisp.dxl") ; (setq fi:common-lisp-directory "C:/Program Files/acl81") You should uncomment (remove the leading semicolon) the lines ; (push "C:/Program Files/acl81/eli" load-path) ; (load "fi-site-init.el") Again, the location pushed onto the load-path (which tells Emacs where to look for files to load) is determined by where Allegro CL is found by the Emacs installer, and so it should be correct (modify it if for any reason it is incorrect). You may also wish to uncomment the three setq lines. They provide defaults for the fi:common-lisp function which we are about to describe. Below we have suggestions for additional code for the .emacs file. After uncommenting, the file should look like: ; This is sample code for starting and specifying defaults to the ; Emacs-Lisp interface. Uncomment this code if you want the ELI ; to load automatically when you start emacs. (push "C:/Program Files/acl81/eli" load-path) (load "fi-site-init.el") ; (setq fi:common-lisp-image-name "C:/Program Files/acl81/mlisp.exe") (setq fi:common-lisp-image-file "C:/Program Files/acl81/mlisp.dxl") (setq fi:common-lisp-directory "C:/Program Files/acl81") If you did not have a .emacs file created when you installed Emacs, or if you are on UNIX, use Emacs to install one or appropriately modify an existing one now. In Emacs, press the keys Control-X Control-F. You are prompted for a file to open. Enter c:\.emacs. A buffer will be opened indicating a new file (or an existing file if one already exists). Copy the contents of the sample .emacs file into the buffer and uncomment the necessary lines as described. Then press the keys Control-X Control-S. The new .emacs file will be created and saved. For UNIX, replace C:/Program Files/ with /usr/local/ and do not use the .exe extension. Some Emacs usage notesIf you are new to Emacs, you may want to look at the Emacs Tutorial, accessed with the Help menu on the Emacs menu bar. In this section, we will just provide brief usage notes which are in no way equivalent to a tutorial. The Meta keyMany Emacs commands require pressing the Meta key. But there is no key labeled `Meta'. On Windows, usually the Alt keys serve as the Meta key. The Alt keys are on typically either side of the space bar. UNIX keyboards are too varied to make a definite suggestion, but often a key next or near the Space bar serves as the Meta key. In Emacs, try pressing Alt-x. If M-x appears in the minibuffer (the bottom bar of the Emacs window), then the Alt key is serving as the Meta key. If you cannot find a Meta key (one that when you hold it down and press x, M-x appears in the minibuffer), press the Escape key and then the x key. That should always work, although it is less convenient. The Meta key is typically abbreviated M- in Emacs documentation, just as the Control key is abbreviated C-. Case matters with the Meta key (Meta-Shift-A is different from Meta-A) but does not matter with the Control key. Starting Lisp in EmacsOnce the eli/fi-site-init file is loaded into Emacs, you can start Allegro CL by entering M-x fi:common-lisp (press the Meta key and the x key simultaneously and then enter `fi:common-lisp', or press the Escape key, the `x' key, and then `fi:common-lisp'). You are prompted in the minibuffer for
After specifying the command-line arguments, Allegro CL is started. If you specified the allegro.exe executable, the IDE will start up as well (the IDE has its own editor and many users use it instead of Emacs, but using Emacs works as well). Some useful Emacs commands
Emacs also has a menu bar. Menu commands can be used in place of key chords (a key chord is multiple keys pressed simultaneously, like M-x). The menus typically show the key chords equivalents of menu commands. Other .emacs file suggestionsAn Emacs function like the following will start the indicated Lisp executable without prompting you for details (as fi:common-lisp does). It is useful if you rarely vary the answers to the prompts. If you regularly run several images, you can write several such functions. Replace the values specified with the appropriate/desired values, of course. In particular, on UNIX, replace c:/program files/ with /usr/local/ and do not use the .exe extension (so /usr/local/acl8.1/mlisp).
(defun run-lisp ()
(interactive)
(fi:common-lisp "*common-lisp*"
"c:/program files/acl81/"
"c:/program files/acl81/mlisp.exe"
'("+B" "+cn")
"localhost"
"c:/program files/acl81/mlisp.dxl"))
Other notesDo not start more that one Lisp in a single emacs. eli.htm is the documentation file for the Emacs-Lisp interface.
© 2008 Franz Inc - Privacy Statement |