Re: [Ilisp-help] edit-definitions-lisp problems
Bob Rogers <[email protected]> Sat, 20 Dec 2003 10:57:53 -0500
| Newsgroups | gmane.lisp.ilisp.devel |
|---|---|
| Message-ID | <[email protected]> |
From: Lynn Quam <[email protected]> Date: Sat, 20 Dec 2003 05:31:22 -0800 Bob Rogers wrote: > I can only imagine that > the ilisp process filter is running during the sit-for interval, and it > somehow fails to preserve the current buffer. Are native threads somehow being used here? I am running on a dual processor AMD Athlon machine. That might help to explain the problem. I am not aware of any threaded emacs implementations. sit-for runs the normal low-level emacs input/event loop, which in turn runs the process filters for any processes that generate output during the interval. This gives the appearance of threading, but the process filters have to be well-behaved. Wrapping save-excursion around (sit-for 1) fixes some of the problems, but I encountered another problem: When I did a M-. in a real application I got an error in lisp-make-cl-method-definition-regexp. It appears to be a bug related to case-sensitivity in read-from-string. See below. I did M-. on a method call (selected-object interactor) and got an error . . . I tracked to problem down to the NIL being passed to reverse is not eq to nil. (I didn't realize Elisp read-from-string was case sensitive.) Yes, and M-. tries not to depend on the case of the symbols it gets back from the Lisp. But NIL, as usual, is special, and I had never tried M-. on a GF with an empty specializer list before. ;-/ In any case, the patch below (as committed) should take care of this, plus adding some extra debugging output to deal with the process filter issue. BTW: I appreciate your suggestion to consider using SLIME . . . My suggestion? . SLIME is a serious project and is likely to produce a far superior replacement for ILISP. It does sound like SLIME is on a trajectory to surpass ILISP. But I haven't had a chance to check it out yet. -- Bob Rogers http://rgrjr.dyndns.org/ ------------------------------------------------------------------------ Index: ilisp-src.el =================================================================== RCS file: /cvsroot/ilisp/ILISP/ilisp-src.el,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ilisp-src.el 18 Dec 2003 02:44:29 -0000 1.11 +++ ilisp-src.el 20 Dec 2003 15:32:20 -0000 1.12 @@ -8,7 +8,7 @@ ;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list ;;; of present and past contributors. ;;; -;;; $Id: ilisp-src.el,v 1.11 2003/12/18 02:44:29 rgrjr Exp $ +;;; $Id: ilisp-src.el,v 1.12 2003/12/20 15:32:20 rgrjr Exp $ (require 'cl) @@ -187,8 +187,11 @@ (condition-case error (while t (setq result (cons (read (current-buffer)) result))) + ;; EOF could also be incomplete syntax, or some CL syntax we can't read. (end-of-file nil)) - (nreverse result)))) + ;; Deal with NIL vs nil. Other symbol case issues need to be addressed by + ;; the caller, but the empty list has to be the empty list. + (nreverse (nsubst nil 'NIL result))))) ;;; Source code definition line matching hacks. @@ -683,9 +686,13 @@ (original-buffer (current-buffer))) ;; [can't use save-excursion because we have to update point in the ;; definitions buffer. -- rgr, 6-Aug-02.] + (if lisp-find-definition-verbose-p + (message "[lfnp %swards in %s:]" + (if back-p "back" "for") original-buffer)) (unwind-protect (progn - (set-buffer (get-buffer-create "*Edit-Definitions*")) + (set-buffer (or (get-buffer "*Edit-Definitions*") + (error "Bug: No *Edit-Definitions* buffer."))) (if back-p (forward-line -1)) (while (not (or result @@ -694,9 +701,15 @@ (forward-line -1)) (cond ((looking-at "\n")) ((looking-at "^;+ *\\(.*\\)") + (if lisp-find-definition-verbose-p + (message " [p4: msg, point is now %s in %s]" + (point) (buffer-name))) (cond ((not back-p) (message "%s" (match-string 1)) - (sit-for 1)))) + (sit-for 1))) + (if lisp-find-definition-verbose-p + (message " [p4b: msg, point is now %s in %s]" + (point) (buffer-name)))) ((looking-at "^!+ *\\(.*\\)") (cond (back-p ;; [***bug***: we don't find these right when ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click