[slime-devel] swank:tokenize-symbol-thoroughly

Derrell Piper ddp at electric-loft.org
Sun Nov 1 23:39:38 UTC 2009


I'm running cvs head and using slime-fancy (which includes slime- 
autodoc).

swank:tokenize-symbol-thoroughly is looking for a package specifier  
and complains if it sees more than two colons.  It thinks it's parsing  
a symbol but this chunk of code causes it to signal an error when  
called with the format control string:

(with-slots (n-start n-pairs min-word legal-chars pairs pair-table) db
   (when verbose
	(format t "n-start: ~d, n-pairs: ~d, min-word: ~d~%" n-start n-pairs  
min-word))
   (dotimes (i n-pairs)

(NB: this obviously isn't a fully formed sexp, just the the smallest  
text blob I could reproduce this with...)

To reproduce this, load slime (w/ autodoc or fancy), bring the above  
four lines up in a lisp buffer and try to C-n to the last line  
(backtrace below).  There's something about the first two lines that's  
relevant.  If you delete either the (with-slots...) or (when  
verbose...) (or both) this doesn't happen.


More than two colons in "\"n-start: ~d, n-pairs: ~d, min-word: ~d~%\""
    [Condition of type SIMPLE-ERROR]

Restarts:
  0: [ABORT] Return to SLIME's top level.
  1: [ABORT-BREAK] Reset this thread
  2: [ABORT] Kill this thread

Backtrace:
   0: (SWANK::TOKENIZE-SYMBOL-THOROUGHLY "\"n-start: ~d, n-pairs: ~d,  
min-word: ~d~%\"")
       Locals:
         STRING = "\"n-start: ~d, n-pairs: ~d, min-word: ~d~%\""
         PACKAGE = "\"N-START"
         SWANK::TOKEN = " ~D, N-PAIRS ~D, MIN-WORD"
         SWANK::BACKSLASH = NIL
         SWANK::VERTICAL = NIL
         SWANK::INTERNP = T
         CHAR = #\:
         #:LOOP-ACROSS-VECTOR-2378 = "\"n-start: ~d, n-pairs: ~d, min- 
word: ~d~%\""
         #:LOOP-ACROSS-INDEX-2379 = 36
         #:LOOP-ACROSS-LIMIT-2380 = 42
   1: (SWANK::PARSE-SYMBOL "\"n-start: ~d, n-pairs: ~d, min-word: ~d~% 
\"" #<Package "COMMON-LISP-USER">)
   2: (SWANK::READ-CONVERSATIVELY "\"n-start: ~d, n-pairs: ~d, min- 
word: ~d~%\"")
   3: (SWANK::PARSE-RAW-FORM ("format" "t" "\"n-start: ~d, n-pairs:  
~d, min-word: ~d~%\"" "n-start" "n-pairs" "min-word"))
   4: (SWANK::PARSE-RAW-FORM ("when" "verbose" ("format" "t" "\"n- 
start: ~d, n-pairs: ~d, min-word: ~d~%\"" "n-start" "n-pairs" "min- 
word")))
   5: (SWANK::PARSE-RAW-FORM ("with-slots" ("n-start" "n-pairs" "min- 
word" "legal-chars" "pairs" "pair-table") "db" ..)))
   6: ((:INTERNAL SWANK:ARGLIST-FOR-ECHO-AREA))
   7: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<COMPILED-LEXICAL-CLOSURE  
(:INTERNAL SWANK:ARGLIST-FOR-ECHO-AREA) #x3000415FF41F>)
   8: (CCL::CALL-CHECK-REGS SWANK:ARGLIST-FOR-ECHO-AREA ("with- 
slots" ("n-start" "n-pairs" "min-word" "legal-chars" "pairs" "pair- 
table") "db" ..)) :PRINT-RIGHT-MARGIN 1000 :PRINT-LINES 1)
   9: (SWANK::EVAL-FOR-EMACS (SWANK:ARGLIST-FOR-ECHO-AREA ..))))  
"COMMON-LISP-USER" 9)
  10: ((:INTERNAL SWANK::SPAWN-WORKER-THREAD))
  11: (#<Anonymous Function #x30004124EB3F> #<Compiled-function  
SWANK:SWANK-DEBUGGER-HOOK #x30004138413F> #<Compiled-function  
(:INTERNAL SWANK::SPAWN-WORKER-THREAD) (Non-Global)  #x30004131288F>)
  12: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* . #1=#<SWANK- 
BACKEND::SLIME-OUTPUT-STREAM #x300041427ABD>) (*STANDARD-INPUT* .  
#<SWANK-BACKEND::SLIME-INPUT-STREAM #x300041427E7D>) ..))) #<COMPILED- 
LEXI..
  13: (SWANK::CALL-WITH-CONNECTION #<CONNECTION #x3000413BC66D>  
#<Compiled-function (:INTERNAL SWANK::SPAWN-WORKER-THREAD) (Non- 
Global)  #x30004131288F>)
  14: (SWANK::CALL-WITH-BINDINGS NIL #<COMPILED-LEXICAL-CLOSURE  
(:INTERNAL SWANK::SPAWN-WORKER-THREAD) #x3000415FFAFF>)
  15: (SWANK-BACKEND::ENTRY)
  16: (CCL::RUN-PROCESS-INITIAL-FORM #<PROCESS worker(14) [Active]  
#x300041568DBD> (#<COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%PROCESS- 
RUN-FUNCTION) #x300041568B3F>))
  17: ((:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (PROCESS))) #<PROCESS  
worker(14) [Active] #x300041568DBD> (#<COMPILED-LEXICAL-CLOSURE  
(:INTERNAL CCL::%PROCESS-RUN-FUNCTION) #x300041568B3F>))
  18: ((:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION))





More information about the slime-devel mailing list