NextPrevUpTopContentsIndex

4.1 Automatic entry into lisp mode

Some source files begin with a line of this form

;;; -*- Mode: Common-Lisp; Author: m.mouse -*-

or this:

;; -*- Mode: Lisp; Author: m.mouse -*-

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"))

Another way to make a Lisp mode buffer is the command New Buffer, and you can put an existing buffer into Lisp mode via the command Lisp Mode.


LispWorks Editor User Guide (Macintosh version) - 14 Mar 2008

NextPrevUpTopContentsIndex