Next Prev Up Top Contents Index

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 - 14 Dec 2001

Next Prev Up Top Contents Index