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

ed-edit-definition loses on user-defined top-level forms

Here's a tidbit that may be of use to some.  I couldn't find
it documented anywhere...

If you define your own top-level form, for example:

(defmacro define-frob (name arglist &body body)
  `(progn (defun ,name ,arglist . ,body)
	  ...do something frob-specific here...))

(define-frob frob1 ()

Now if you try to use ed-edit-definition (m-.) on frob1 Fred
can't find it.  To enable Fred to find define-frob forms you
can do the following:

(let ((x (assoc 'function ccl::*define-types-alist*)))
  (setf (cdr x) (cons "ine-frob" (cdr x))))

This is from memory, so I hope I got it right.  Note that
the top-level form must start with "def".  If something like
this is documented and I missed it, please let me know!