Next Previous Up Top Contents Index

4 Editing Lisp Programs

4.1 Automatic entry into lisp mode

Some source files begin with the line

;; -*- Mode:Common-Lisp;

or the line

;; -*- Mode:Lisp;

A buffer is automatically set to be in lisp mode when such a file is displayed.

Alternatively, if you have files of Common Lisp code with extension other than.lisp, add the following code to your.lispworks file, substituting the extensions shown for your own. This ensures that Lisp mode is the major mode whenever a file with one of these extensions is viewed in the editor:

(editor:define-file-type-hook 
     ("lispworks" "lisp" "slisp" "el" "lsp" "mcl" "cl")
     (buffer type)
     (declare (ignore type))
     (setf (editor:buffer-major-mode buffer) "Lisp"))


LispWorks Editor User Guide - 15 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker