The following works for me. I change the prompt to things with the package
name in them:
(in-package "DEBUG")
;;; To use these with ilisp you have to set comint-prompt-regexp
;;; (a buffer-specific variable) to something like:
;;; (setq comint-prompt-regexp "^\\([-a-zA-Z0-9]*|\\$+\\|[-a-zA-Z0-9]*\\:\\)
;;; See /usr/share/xemacs/xemacs-packages/lisp/ilisp/ilisp-cmu.el
(setf lisp::*enable-package-locked-errors* nil)
(defun my-debug-prompt ()
(let ((*standard-output* *debug-io*))
(format t "~%~A|" (or (first (package-nicknames *package*))
(package-name *package*)))
;; ilisp needs this
(dotimes (i *debug-command-level*) (princ "$"))
(princ " ")))
(defun my-prompt ()
(format nil "~A: " (or (first (package-nicknames *package*))
(package-name *package*))))
(eval-when (:compile-toplevel :load-toplevel :execute)
(setf debug:*debug-prompt* #'my-debug-prompt)
(setf ext:*prompt* #'my-prompt))
(setf lisp::*enable-package-locked-errors* t)
Michael Graffam wrote:
>
>
>
> On Sat, 29 Nov 2003, Raymond Toy wrote:
>
>> Look at *prompt* and debug:*debug-prompt*. They both take a function.
>> Will this do what you want?
>
> Well, I knew about *prompt* which works as expected:
>
> * (defun myprompt () "CMUCL> ")
>
> MYPROMPT
> * (setf *prompt* #'myprompt)
>
> #<Interpreted Function MYPROMPT {4801D551}>
> CMUCL>
>
> ..so far, so good..
>
> CMUCL> (setf debug:*debug-prompt* #'myprompt)
>
> #<Interpreted Function MYPROMPT {4801D551}>
> CMUCL> (no-such-function)
>
> .. now, at this point I would hope to enter the debugger and be given a
> "CMUCL>" prompt, but this doesn't happen. In fact, what happens is quite
> mysterious to me :)
>
> Along with the expected warning about "no-such-function" not existing,
> and some debugger kruft I get the following:
>
> (KERNEL:%COERCE-TO-FUNCTION NO-SUCH-FUNCTION)
> Source: Error finding source:
> Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM: Source file no longer
> exists:
>
> ..and since I don't get a "CMUCL>" prompt, the mission has failed.
--
- Peter