[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

editor modes and packages

I am trying to write a major mode that effectively does a "set package"
for buffers in its mode. I managed to get part way with this:

(defmethod (major-mode-default-default-package my-mode) ()
  (values *my-package* t))

This seems to work fine for new files, but when I find (^X^F) an
existing file of a type that puts me in my-mode, the buffer is in
package CL-USER.  Also if I create a buffer, then set it to my-mode,
it stays in package CL-USER.

Can anyone suggest the right way to associate *my-package* with my-mode?

Mark Saaltink			I. P. Sharp Assoc. Ltd.
mark@red.ipsa.dnd.ca		Ottawa, Canada