I'm attaching the message for a slime internal bug. I think the issue is that slime doesn't recognize reader conditionals like #+:executable. In fact, changing slime-reader-conditionals-regexp to (regexp-opt '("#+" "#-" "#!+" "#!-" "#+:" "#-:"))) fixes this issue. But perhaps the bug is in slime-search-suppressed-forms? Changing #+:executable to #+executable (and #-: to #-) makes slime handle the file.
The file I was looking at was src/code/save.lisp from cmucl.
Ray
(11) (slime,warning/warning) "save.lisp":298:64 (pt=10630). Caught error during fontification while searching for forms that are suppressed by reader-conditionals. The error was: (cl-assertion-failed (<= (point) limit)).
This is a bug in Slime itself. Please report this to the mailinglist slime-devel@common-lisp.net and include your Emacs version, the guilty Lisp source file, the header of this message, and the following backtrace.
Backtrace: backtrace() (let ((standard-output standard-output)) (backtrace)) (let ((standard-output ...)) (let (...) (backtrace)) (with-current-buffer standard-output (prog1 ... ...))) (with-output-to-string (backtrace)) (slime-display-warning "%S:%d:%d (pt=%d).\n%s\n\nThis is a bug in Slime itself. Please report this to the\nmailinglist slime-devel@common-lisp.net and include your Emacs\nversion, the guilty Lisp source file, the header of this\nmessage, and the following backtrace.\n\nBacktrace:\n%s\n--------------------------------------------------------------\n" (buffer-name) (line-number-at-pos) (current-column) (point) (apply (function format) message args) (with-output-to-string (backtrace))) slime-bug("Caught error during fontification while searching for forms\nthat are suppressed by reader-conditionals. The error was: %S." (cl-assertion-failed (<= (point) limit))) byte-code("..." [condition result nil slime-bug "Caught error during fontification while searching for forms\nthat are suppressed by reader-conditionals. The error was: %S."] 3) slime-search-suppressed-forms(10507) font-lock-fontify-keywords-region(9459 10507 nil) font-lock-default-fontify-region(9459 10507 nil) font-lock-fontify-region(9459 10507) lazy-shot-fontify-internal(#<buffer "save.lisp"> 9459 10491 t "stealthy ") lazy-shot-lock-extent(#<destroyed extent> t) lazy-shot-stealth-lock(#<buffer "save.lisp">) apply(lazy-shot-stealth-lock #<buffer "save.lisp">) byte-code("..." [this-command inhibit-quit quit-flag match-data itimer current-itimer match-data ((store-match-data match-data)) nil itimer-uses-arguments apply itimer-function itimer-function-arguments last-event-time next-wakeup itimers time-elapsed] 5) itimer-run-expired-timers(1.084827) itimer-timer-driver(nil) ("execute_internal_event()" "[internal]") (dispatch-event "[internal]")
Raymond Toy toy.raymond@gmail.com writes:
I'm attaching the message for a slime internal bug. I think the issue is that slime doesn't recognize reader conditionals like #+:executable. In fact, changing slime-reader-conditionals-regexp to (regexp-opt '("#+" "#-" "#!+" "#!-" "#+:" "#-:"))) fixes this issue. But perhaps the bug is in slime-search-suppressed-forms? Changing #+:executable to #+executable (and #-: to #-) makes slime handle the file.
The file I was looking at was src/code/save.lisp from cmucl.
There's no such problem with GNU Emacs 23. Others repeatedly reported problems with XEmacs, so I just tried it, and I can confirm it.
The reason is that font-lock of XEmacs does not seem to provide a way to extend the region that's currently being fontified. I think we could kludge that in manually. Perhaps I'll do it when I'll find the time.
-T.
Tobias C. Rittweiler wrote:
Raymond Toy toy.raymond@gmail.com writes:
I'm attaching the message for a slime internal bug. I think the issue is that slime doesn't recognize reader conditionals like #+:executable. In fact, changing slime-reader-conditionals-regexp to (regexp-opt '("#+" "#-" "#!+" "#!-" "#+:" "#-:"))) fixes this issue. But perhaps the bug is in slime-search-suppressed-forms? Changing #+:executable to #+executable (and #-: to #-) makes slime handle the file.
The file I was looking at was src/code/save.lisp from cmucl.
There's no such problem with GNU Emacs 23. Others repeatedly reported problems with XEmacs, so I just tried it, and I can confirm it.
The reason is that font-lock of XEmacs does not seem to provide a way to extend the region that's currently being fontified. I think we could kludge that in manually. Perhaps I'll do it when I'll find the time.
Yes, sorry for the noise. I found out late yesterday that the problem was the font-lock region was not large enough for the end of the conditional.
XEmacs allows using a replacement function for font-lock (I use lazy-shot). Perhaps slime can hook into that by defining its own function that extends the region and calling the underlying font-lock function? I'll try to look into this...
Ray
Raymond Toy toy.raymond@gmail.com writes:
XEmacs allows using a replacement function for font-lock (I use lazy-shot). Perhaps slime can hook into that by defining its own function that extends the region and calling the underlying font-lock function? I'll try to look into this...
I'd probably write a wrapper around `slime-search-suppressed-forms' which first calls `slime-extend-region-for-font-lock', and then moves point to the beginning of that region, and calls `slime-search-suppressed-forms' with the end as the limit.
I'd hope that won't cause any problems, just be less efficient (it may do work twice, or thrice); so better take a glance at the font-lock sources first.
-T.