2008-12-09 Helmut Eller Reset the stream column to 0 after eval requests. * swank.lisp (interactive-eval, eval-region): Use FRESH-LINE to reset the stream column. * slime.el (test repl-test): Adjust test accordingly. 2008-12-09 Helmut Eller Be a bit more careful when computing the toplevel restart. * swank.lisp (throw-to-toplevel): Test *sldb-quit-restart* for nilness. * sldb-quit (sldb-quit): Show the returned value in brackets. 2008-12-09 Helmut Eller Make the modeline a bit shorter. * slime.el (slime-compute-modeline-string): Remove PKG: and CON: to save space. (slime-compute-modeline-connection-state): Don't include zeros. 2008-12-09 David Reitter * slime.el (slime-repl-mode): Use `run-mode-hooks' rather than just `run-hooks'. That way, after-change-major-mode-hook is called automatically. 2008-12-07 Nikodemus Siivola * slime.el (slime-qualify-cl-symbol-name): Clean up the package name using `slime-pretty-package-name', so that packages named with strings are not left with the extra doublequotes. 2008-12-05 Tobias C. Rittweiler * slime.el (slime-macroexpansion-minor-mode-map): Bind keybindings of `undo' to `slime-macroexpansion-undo'. (slime-show-macroexpansion): Renamed to `slime-initialize-macroexpansion-buffer' (slime-initialize-macroexpansion-buffer): Make sure that the user can't undo past the initial insertion. (slime-macroexpand-undo): New function. Tries to undo-only. 2008-12-05 Tobias C. Rittweiler * slime.el (slime-trace-query): SPEC argument can be a symbol. 2008-12-02 Tobias C. Rittweiler * slime.el (slime-compute-modeline-connection-state): Fix computation of debugged requests. 2008-11-30 Gábor Melis * slime.el (slime-compute-modeline-connection-state): Print the number of debugged requests if non-zero. (slime-connection-state-as-string): Removed unused branches. (slime-compute-connection-state): Removed :debugged branch making most likely return :connected instead. 2008-12-02 Tobias C. Rittweiler Modeline wouldn't display {debugged..} after `slime-interrupt'. * slime.el (slime-debugged-connection-p): Can't rely on `sldb-debugged-continuations' to be non-null in every SLDB buffer. 2008-11-23 Helmut Eller `q' in temp buffers should only delete the window if it was newly created for the buffer. * slime.el (slime-display-popup-buffer): New function. Recognize if the window didn't exist before. Save the created window and the selected window in buffer local variables. (slime-make-popup-buffer): Renamed from slime-popup-buffer. (slime-popup-buffer-quit): Delete the created window (if needed) and restore the old selected window. Don't touch other windows. (slime-edit-value-callback): Calling lisp-mode deletes all local variables. We need to that inside with-popup-buffer. 2008-11-22 Helmut Eller * slime.el (slime-update-all-modelines): Only walk through widnow-list not buffer-list. (slime-restart-or-init-modeline-update-timer): Inrease the timer interval to 0.5 seconds. 2008-11-22 Gábor Melis Reincarnate "eval..." (almost) * slime.el (slime-compute-modeline-connection-state): Return the number of outstanding requests if connected. (slime-update-all-modelines): Renamed from slime-update-modelines, loops through all slime buffers. (slime-restart-or-init-modeline-update-timer): New function. (slime-dispatch-event): Arrange for modelines to be updated on :EMACS-REX and :RETURN. 2008-11-22 Helmut Eller * swank.lisp (invoke-default-debugger): New condition type. (swank-debugger-hook): Handle invoke-default-debugger conditions. (sldb-break-with-default-debugger): Signal invoke-default-debugger to transfer control to the default debugger. New argument DONT-UNWIND to invoke the native debugger without unwinding the stack. * slime.el (sldb-break-with-default-debugger): By default, unwind the stack before invoke the native debugger. With prefix argument, run the native debugger in the dynamic environment of SLDB. 2008-11-02 Helmut Eller * slime.el ([test] package-updating): Allegro returns "||" as prompt for the keyword package. I guess that's acceptable. 2008-11-02 Helmut Eller * slime.el (slime-popup-buffer-quit): Always delete windows and bury the buffer. 2008-11-02 Helmut Eller * swank-backend.lisp (slime-interrupt-queued): New condition. * swank.lisp (invoke-or-queue-interrupt): Raise it here. * swank-cmucl.lisp (wait-for-input): Make fd readable in condition handler so that we can call serve-events without timeout. 2008-11-02 Helmut Eller * slime.el ([test] find-definition.2, [test] compile-defun): Expect to fail for CCL. 2008-10-31 Helmut Eller * slime.el (slime-repl-history-pattern): Simplify as suggested by Knut Olav Bøhmer and Michael Weber. 2008-10-31 Helmut Eller * slime.el (slime-eval-with-transcript) (slime-eval-with-transcript-cont): Restore the current buffer, before calling cont. 2008-10-31 Helmut Eller * swank-lispworks.lisp (describe-function): Don't use string-upcase on lambda-list-argruments, because not all elements must be symbols. 2008-10-31 Helmut Eller * swank.lisp (debug-in-emacs): Bind *sldb-quit-restart* here. If necessary, use the current abort retstart. 2008-10-30 Helmut Eller * swank-sbcl.lisp (wait-for-input): Return streams which are at EOF. 2008-10-30 Helmut Eller * slime.el (slime-popup-buffer-quit): Call bury-buffer with explicit argument for compatibility with XEmacs. 2008-10-30 Ivan Shvedunov * slime.el (slime-repl-history-pattern): Use the part of input between its start and (point) as history search pattern. Previously we used the entire input. 2008-10-26 Helmut Eller * test.sh: Return the number of failed tests as exit code. * slime.el: Fix change from 2008-10-20. Use (eval-when (compile)...) instead of (eval-when-compile ...), because the latter is more like (eval-when (compile eval) ...). 2008-10-23 Helmut Eller * slime.el (slime-redirect-inferior-output): New command. 2008-10-21 Helmut Eller * swank-allegro.lisp (frame-restartable-p): Handle errors signaled by debugger:frame-retryable-p. This looks like an Allegro bug, though. Reported by Luke Hope. 2008-10-20 Helmut Eller * slime.el: Require some packages, e.g. apropos, at compile time to suppress some "undefined function" warnings. 2008-10-19 Helmut Eller * swank.lisp (frame-locals-and-catch-tags): New function. Fetch locals and catch tags with a single RPC. * slime.el (sldb-frame-details): Use it. * swank-backend.lisp (frame-catch-tags): Provide a default implementation. Delete the dummy defs in various backends. 2008-10-19 Mark Evenson * swank-abcl.lisp (handle-compiler-warning): Report source location position when we can. Use NAMESTRING for *compile-filename*. 2008-10-19 Helmut Eller * swank-clisp.lisp (filename-to-pathname, parse-cygwin-filename): Accept Windows and Unix filenames when :CYGWIN is in *features*. 2008-10-17 Helmut Eller * swank-sbcl.lisp (swank-compile-file): Fix typo. 2008-10-17 Helmut Eller * swank-backend.lisp (compute-sane-restarts): Deleted. Use plain compute restarts instead. 2008-10-17 Helmut Eller * swank.lisp (call-with-retry-restart): Implement this a little less confusing. 2008-10-17 Helmut Eller * swank-backend.lisp (frame-restartable-p): New function. (swank-frame): Deleted. Update implemenetations accordingly. (print-frame): Renamed back from print-swank-frame. * swank.lisp (backtrace): Don't clutter the backtrace with '(:restartable :unknown). For practical purposes :unknown is the same as nil. * slime.el (sldb-compute-frame-face): Only accept nil or t for the :restartable prop. 2008-10-16 Helmut Eller * swank-backend.lisp (swank-compile-file): Return the same values as COMPILE-FILE. Update backends accordingly. * swank-lispworks.lisp (with-swank-compilation-unit): Return the values of BODY. (compile-from-temp-file) * swank-allegro.lisp (compile-from-temp-file) * swank-clisp.lisp (swank-compile-string) * swank-abcl.lisp (swank-compile-string): Return T on success. * swank.lisp (collect-notes): Check return type of FUNCTION. 2008-10-16 Helmut Eller * swank-openmcl.lisp (frame-catch-tags): Disabled as it prevents FRAME-LOCALS from working in lx8632. 2008-10-10 Nikodemus Siivola * slime.el (slime-inspector-toggle-verbose): New function. (slime-inspector-mode-map): Bind v to slime-inspector-toggle-verbose. (slime-cheat-sheet-table): Add slime-inspector-toggle-verbose. * swank.lisp (*inspector-verbose*): New variable. ([defstruct] istate): New slot called verbose. (istate>elisp): If the current istate is verbose, use untruncated result of TO-STRING as the title. (inspect-nth-part): Use the verbosity of the current istate. * doc/slime.texi: Document slime-inspector-toggle-verbose. 2008-10-07 Nikodemus Siivola * swank.lisp (*backtrace-printer-bindings*): export. 2008-10-05 Helmut Eller * swank-cmucl.lisp (list-callers): Do a full GC before calling map-allocated-objects. That's needed because map-allocated-objects seems to cons even if it's inlined. (emacs-inspect [code-component]): Try to detect byte-code-components. (inspect-alien-record, mv-function-end-breakpoint-values): Avoid compiler warnigns. 2008-10-04 Tobias C. Rittweiler * swank-sbcl.lisp: Add support for WHO-SPECIALIZES. This requires a patch for SBCL's SB-INTROSPECT contrib which I sent upstream a few minutes ago. 2008-10-04 Helmut Eller Some cleanups for compilation commands. * slime.el ([defstruct] slime-compilation-result): Rename result slot as successp. (slime-make-compilation-finished-continuation): Deleted. slime-eval-async preserves the current buffer and preserving the window-configuration was always a questionable feature. (slime-compilation-finished): Simplified. (slime-show-note-counts): Also show the success/failure flag. (slime-recompile-locations): Take a continuation as argument rather than messing around with compilation-finished-hooks. (slime-aggregate-compilation-results): New function. (slime-xref-recompilation-cont): Renamed from slime-make-xref-recompilation-cont. (slime-compiler-results): Deleted. (slime-goto-first-note-after-compilation): Replaced with hook function slime-goto-first-note. (slime-compilation-just-finished): Deleted. (slime-to-lisp-filename-function): Use convert-standard-filename. * swank.lisp ([defstruct] compilation-result): Renamed from swank-compilation-result. (measure-time-interval): Return seconds as float. (collect-notes): Renamed from swank-compiler. Return a single compilation-result. (compile-multiple-strings-for-emacs): Return a list of compilation-results instead of a single result with merged notes. * swank-backend.lisp (filename-to-pathname): Renamed from parse-emacs-filename. Updated callers. (pathname-to-filename): New function. Use it where appropriate. * swank-scl.lisp (pathname-to-filename): Implement it in the backend to get rid of the #+scl in swank.lisp. * swank-cmucl.lisp (swank-compile-file, swank-compile-string): Return t on success. 2008-10-04 Alain Picard UTF-8 support for Lispworks. * swank-lispworks.lisp (accept-connection): Use flexi-streams for utf-8. (make-flexi-stream): New function. (*temp-file-format*): New variable (compile-from-temp-file): Use it. 2008-09-28 Tobias C. Rittweiler * slime.el (slime-list-compiler-notes): Revert change from 2008-08-15 which introduced automatic shrinkage of the compiler-notes buffer. This turned out to be more annoying than worthwhile. On the cases where it's desired, the user can just use `C-x -' himself to shrink the notes buffer. 2008-09-28 Helmut Eller Stop handling events in worker threads after sldb-quit. * swank.lisp (with-top-level-restart): New macro. (handle-requests, spawn-worker-thread): Use it. (process-requests): Drop the just-one argument. (handle-or-process-requests): Deleted. Call handle-requests directly. 2008-09-27 Tobias C. Rittweiler Improve ECL's arglist support somewhat. * swank-ecl.lisp (grovel-docstring-for-arglist): New function. (arglist): Use it. Now also try to find an arglist for special operators, and macros. 2008-09-26 Tobias C. Rittweiler * slime.el (slime-cycle-connections): Do not make the new connection buffer-local if we're currently in a REPL buffer. 2008-09-24 Knut Olav Bøhmer * slime.el (slime-cycle-connections): New command. 2008-09-24 Helmut Eller * slime.el (slime-prefix-map): New keymap. (slime-define-key): Use it. Also drop unused :inferior arg. (slime-inspector-mode-map): Bind C-c to slime-prefix-map. (slime-define-both-key-bindings): New function. Factor of slime-init-keymaps. (slime-init-keymaps): Use it. (slime-control-modified-char): Deleted. 2008-09-23 Douglas Crosher * swank-scl.lisp: update for Scieneer CL 1.3.8. * swank.lisp (ed-in-emacs): customize for the SCL. * swank.lisp (signal-interrupt): fix typo. 2008-09-22 Nikodemus Siivola * swank.lisp (guess-package): Return NIL if string designator is NIL: makes files without IN-PACKAGE forms more *BREAK-ON-SIGNALS* friendly. 2008-09-22 Helmut Eller * swank-sbcl.lisp (wait-for-input): Implement this in backend, since read-char-no-hang doesn't work in fd-handlers. (install-sigint-handler): Go through invoke-interruption and with-interrupts to support nested interrupts. * slime.el (slime-lisp-implementations): Mention :env keyword in docstring. 2008-09-21 Helmut Eller * slime.el (slime-repl-input-end-mark): Deleted. It was always at the end of buffer. Use point-max instead. (slime-repl-eol): Removed. The usual end-of-line does the same. 2008-09-21 Helmut Eller * slime.el (slime-eol-conversion-fixup): Return 0 (not nil) for anyting other than CRLF conventions. 2008-09-21 Helmut Eller * swank-openmcl.lisp: Try to remove the first few internal frames from backtraces. (guess-stack-top): New function. (call-with-debugging-environment): Use it (frame-arguments): Return a list instead of a string. Don't quote symbols. (source-locations): Recognize (:internal FOO) functions. 2008-09-21 Helmut Eller * swank.lisp (*backtrace-pprint-dispatch-table*): Honor *print-escape*. 2008-09-20 Ariel Badichi * slime.el (slime-with-output-end-mark): slime-repl-show-maximum-output no longer accepts any arguments. 2008-09-20 Helmut Eller * test.sh: Parse the -S option as advertized. * slime.el (slime-randomize-test-order): Add the * to the docstring. ([def-slime-test] break2): Also CCL is expected to fail here. 2008-09-20 Helmut Eller Fix some of the bugs that I introduced with the last commits. * swank-openmcl.lisp (call-with-debugging-environment): Fix typo. (call-with-debugger-hook): Bind *break-in-sldb*. (backtrace-context): Return nil, not tcr! (map-backtrace): Remove the stack< test. Only test for nil. (lisp-implementation-type-name): Return "ccl". (emacs-inspect (t)): Fix typo. (kill-thread): Use join-process. Otherwise we get strange "process-reset" errors when disconnecting. (thread-alive-p): Implemented with ccl::process-exhausted-p. (source-locations): Use labels for helper functions. (function-source-location): Now implemented on top of source-locations. 2008-09-20 Helmut Eller Fix frame-source-location-for-emacs for CCL. * swank-openmcl.lisp (source-locations): New function. (create-source-location): New function. (frame-source-location-for-emacs): Use it. 2008-09-20 Helmut Eller Fix inspecting of arrays. * swank-openmcl.lisp (emacs-inspect :around (t)): call-next-method may return a lazy list. Detect that case and only append to ordinary lists. (emacs-inspect (t)): Don't mark labels as inspectable. Just print them. 2008-09-20 Helmut Eller Fix BREAK and backtraces after interrupts. * swank-openmcl.lisp (*sldb-stack-top-hint*): New variable. (call-with-debugging-environment, break-in-sldb) (interrupt-thread): Use it. (*process-to-stack-top*, record-stack-top) (grab-stack-top): Deleted. Use *sldb-stack-top-hint* instead. (backtrace-context): Deleted. Use %current-tcr directly. 2008-09-20 Helmut Eller * swank-openmcl.lisp (call-with-debugging-environment): Don't set *debugger-hook* to nil. 2008-09-19 Helmut Eller * slime.el ([def-slime-test] break): Split it up in two versions to make the debugger-hook issue more explicit. * swank-allegro.lisp (frob-allegro-field-def): There seems to be a new type :func handle it like :lisp. 2008-09-19 Helmut Eller * slime.el (slime-save-marker): New marcro. Use it in combination with insert-before-markers. (slime-check-buffer-contents): Use {} resp. [] to describe the position of output resp. input markers. (slime-repl-emit-result): Update window-point. (slime-randomize-test-order): New variable. (slime-shuffle-list): New function. (slime-run-tests): Use it. (slime-batch-test): Accept test-name and randomize arguments. * test.sh (usage): Accept -n and -S options. 2008-09-18 Tobias C. Rittweiler * swank-ecl.lisp: Forgot to update ECL's backend when introducing swank-frames in commit on 2008-09-12. 2008-09-18 Helmut Eller Some cleanups for the REPL code. * slime.el (slime-show-last-output) (slime-show-last-output-function) (slime-show-last-output-region) (slime-maybe-display-output-buffer) (slime-repl-last-input-start-mark): Delete unused code. (slime-repl-emit-result, slime-repl-insert-prompt) (slime-repl-show-abort, slime-repl-insert-result) (slime-insert-transcript-delimiter) (slime-eval-with-transcript-cont): Consistently use save-excursion and insert-before-markers. We always want to preserve the cursor position in the input region (for type-ahead). (slime-eval-with-transcript): Change order of arguments to make the common case easier to use. (slime-batch-test): Use a timer. (slime-check-buffer-contents): New function to test contents and current position. Use it in various places. (sldb-recenter-region, def-slime-test interactive-eval) (def-slime-test interactive-eval-output): Act slightly differently when the test suite is executed in batch mode (without terminal). * swank.lisp (handle-requests): Flush output. (interactive-eval, interactive-eval): Don't use fresh-line, as that makes it harder to test the REPL code. * test.sh (usage): Add a -T switch to run slime in the current directory without copying (and compiling) everything to a temporary directory. 2008-09-18 Helmut Eller * slime.el (slime-eval-with-transcript): Accept some more arguments so that we can also use it for compile-file. (slime-eval-with-transcript-cont): New. Insert prompt. (slime-compile-file): Use slime-eval-with-transcript. (slime-repl-show-maximum-output): Update window point. (slime-repl-insert-prompt): Don't use insert-before-markers. (slime-repl-emit): No longer use slime-with-output-end-mark. 2008-09-17 Tobias C. Rittweiler * swank-sbcl.lisp (make-definition-source-location): Fix typo introduced with crlf-related commit on 2008-09-16. 2008-09-17 Helmut Eller * slime.el (slime-repl-popup-on-output): New variable. (slime-repl-emit): Honor slime-repl-popup-on-output. (slime-eval-with-transcript): Use slime-repl-popup-on-output. Also remove the function argument, as it was only used once and that was slime-message. 2008-09-17 Helmut Eller (*pre-reply-hook*): Add 'force-user-output. 2008-09-17 Helmut Eller * swank.lisp (send-user-output): Lifted from make-output-function. Make this a top-level function for easier redefinition. 2008-09-17 Helmut Eller * slime.el (slime-test-find-top-level-restart): New function. [def-slime-test] (interrupt-at-toplevel, interrupt-in-debugger): Use it. 2008-09-16 Helmut Eller * slime.el (slime-connection): Optionally select a new default connection. (slime-auto-select-connection): New variable. (slime-auto-select-connection): New function. 2008-09-16 Helmut Eller Adjust positions in files with CRLF style end-on-line markers. * slime.el (slime-eol-conversion-fixup): New function. (slime-goto-location-position): Use it. Also add a new position type :offset, so that we don't adjust offsets in strings that were sent over the wire (which uses LF eol-convention). * swank-abcl.lisp * swank-allegro.lisp * swank-clisp.lisp * swank-cmucl.lisp * swank-corman.lisp * swank-ecl.lisp * swank-lispworks.lisp * swank-openmcl.lisp * swank-sbcl.lisp * swank-scl.lisp: Create :offset style positions where needed. * swank-lispworks.lisp (skip-comments): New function. (dspec-stream-position): Use it. 2008-09-16 Tobias C. Rittweiler * slime.el (slime-end-of-list): `backward-down-list' was used there which is defined by paredit.el. Use `(down-list -1)' instead. 2008-09-15 Helmut Eller * swank-lispworks.lisp (describe-symbol-for-emacs): Revert last change. 2008-09-15 Helmut Eller * swank.lisp (sldb-loop): Send a :sldb-return event to ourselfes to inform the debug session at the lower level. (wait-for-event): Drop the report-interrupt argument. No longer needed. (event-match-p): Add an OR pattern operator. Used to wait for different events simultaneously. (read-packet): Use peek-char to detect EOF. read-sequence wouldn't work. * slime.el (slime-test-interrupt-in-debugger): Call sldb-quit and sldb-continue in the right buffer. * swank-backend.lisp (wait-for-input): * swank-cmucl.lisp (wait-for-input): * swank-clisp.lisp (wait-for-input): Use the idiom "(when (check-slime-interrupts) (return :interrupt))". 2008-09-15 Helmut Eller Interrupt related hacking. * swank-backend.lisp (*pending-slime-interrupts*): Should be thread-local. Leave global value unbound. * swank.lisp (with-interrupts-enabled%): New helper macro. (with-slime-interrupts, without-slime-interrupts): Use it. (call-with-connection): Bind *pending-slime-interrupts* here. (wait-for-event): Add a report-interrupt argument. Currently used by the debugger to detect when a nested debugger session, which was triggered by an interrupt in wait-for-event, returns. Doesn't work well, though. * slime.el (slime-test-interrupt-in-debugger): New test. 2008-09-14 Helmut Eller Introduce a WAIT-FOR-INPUT backend function. CMUCL's blocking input functions READ-CHAR etc. are hard to use with interrupts. In the backend we have a more realistic chance to get interrupts working. * swank-backend.lisp (wait-for-input): New function. * swank-cmucl.lisp, swank-clisp.lisp (wait-for-input): Implement it. * swank.lisp (wait-for-event/event-loop): Use WAIT-FOR-INPUT and rescan the event-queue if WAIT-FOR-INPUT was interrupted. (reader-event): Deleted. Merged into wait-for-event/event-loop resp. dispatch-loop. (decode-message): Drop the timeout argument. (*events-enqueued*): A counter to quickly detect new events after a wait. (call-with-connection): If the argument is already the current connection, don't rebind anything. (without-slime-interrupts, with-slime-interrupts): Don't rebind *pending-slime-interrupts*. Just to be save. * slime.el (sldb-maybe-kill-buffer): New function, to handle the case when the debugger was interrupted in WAIT-FOR-INPUT and we want to return to the previous debug level. 2008-09-12 Helmut Eller For Lispworks, parse the $LWHOME/lwdoc file. * swank-lispworks.lisp (lwdoc, lookup-lwdoc, parse-lwdoc-record): New functions. (describe-symbol-for-emacs): Use it. 2008-09-12 Tobias C. Rittweiler In an SLDB buffer, `C-c C-c' will now recompile the source behind a frame. In particular, `C-u C-c C-c' will recompile the frame with high debug settings. * slime.el (sldb-recompile-frame-source): New function. (sldb-mode-map): Bind `C-c C-c' to it. * slime.el (sldb-overlays, sldb-delete-overlays, slime-xref-cleanup): Removed. Sldb-overlays weren't created anymore since 2008-08-17. 2008-09-12 Tobias C. Rittweiler New faces: `sldb-restartable-frame-line-face', `sldb-non-restartable-frame-line-face'. The former is the face for frames that are surely restartable, the latter for frames that are surely not restartable. If restartability of a frame cannot be reliably determined, the face `sldb-frame-line-face' is used. At the moment, determination of frame restartability is supported by the SBCL backend only. * slime.el (sldb-frame.string): New. (sldb-frame.number): New. (sldb-frame.plist): New. (sldb-prune-initial-frames): Use them. (sldb-insert-frames): Ditto. (sldb-compute-frame-face): New. (sldb-insert-frame): Use `sldb-compute-frame-face' to insert frames with one of the faces described above. * swank.lisp (defslimefun backtrace): Changed return value; each frame is now accompanied with a PLIST which at the moment can contain :RESTARTABLE NIL/T/:UNKNOWN depending on whether the frame is restartable, or not. * swank-backend.lisp (defstruct swank-frame): New structure. (compute-backtrace): Is now supposed to return a list of SWANK-FRAMEs. (print-frame): Renamed to PRINT-SWANK-FRAME. * swank-sbcl.lisp, swank-cmucl.lisp, swank-lispworks.lisp, * swank-allegro.lisp, swank-scl.lisp, swank-openmcl.lisp, * swank-abcl.lisp, swank-clisp.lisp: Adapted to swank-backend changes. 2008-09-11 Helmut Eller * doc/slime-refcard.tex: Fix typos. 2008-09-11 Gary King * swank-allegro.lisp (fspec-definition-locations): add declare ignores to prevent warnings (emacs-inspect): remove first definition on function since it was being overwritten by the next one. Wrap the method on t with a excl:without-redefinition-warnings to prevent warning. 2008-09-11 Helmut Eller * swank-cmucl.lisp (slime-output-stream): Remove last-flush-time slot. (sos/flush): Renamed from sos/misc-force-output. Don't try to be clever: no timestamps and no line buffering. (sos/write-char, sos/write-string): Renamed from sos/out resp. sos/sout. Call output-fn outside without-interrupts. (sos/reset-buffer): New function. 2008-09-11 Tobias C. Rittweiler * slime.el (slime-compilation-unit): Renamed to `slime-compilation-result'. (slime-last-compilation-unit): Renamed to `slime-last-compilation-result'. (slime-compiler-notes, slime-compiler-results): Adapted accordingly. (slime-compilation-finished): Ditto. 2008-09-11 Tobias C. Rittweiler * slime.el (slime-popup-buffer-restore-snapshot): Make sure that the buffer-local variable containing the popup buffer's snapshot is set to nil in the right buffer. 2008-09-11 Tobias C. Rittweiler Reimplement recompilation support. The previous implementation involving specials was subtly broken with the :fd-handler communcation-style, because of serve-event's polite interplay with specials. (Cf. my slime-devel post "Per event bindings" on 2008-08-17.) * swank.lisp (with-swank-compilation-unit): Removed. (record-note-for-condition): Removed. (defstruct swank-compilation-unit): Renamed to `swank-compilation-result'. (swank-compilation-unit-for-emacs): Renamed to `swank-compilation-result-for-emacs'. (swank-compiler): Takes additional argument, the swank-compilation-result where caught notes should be accumulated into. (defslimefun compile-file-for-emacs): Adapted accordingly. (defslimefun compile-string-for-emacs): Ditto. (defslimefun compile-multiple-strings-for-emacs): New RPC call. * slime.el (slime-make-compile-expression-for-swank): Removed. (slime-compile-string): Don't use above function anymore. Adapted. (slime-recompile-locations): Rewritten to use new RPC call above. 2008-09-10 Tobias C. Rittweiler * swank-backend.lisp (*gray-stream-symbols*): Comment out STREAM-FILE-POSITION. 2008-09-10 Tobias C. Rittweiler * swank.lisp (eval-for-emacs): Remove WITH-RETRY-RESTART again for simplicity reasons. (interactive-eval): Add WITH-RETRY-RESTART. (eval-and-grab-output): Ditto. (interactive-eval-region): Ditto. (re-evaluate-defvar): Ditto. (pprint-eval): Ditto. (repl-eval): Ditto. (eval-string-in-frame): Ditto. (pprint-eval-string-in-frame): Ditto. (init-inspector): Ditto. (inspect-in-frame): Ditto. 2008-09-09 Tobias C. Rittweiler A RETRY restart is provided for all Slime evaluation requests. The rationale is that restarting from a frame is mostly only possible for functions compiled with high debug settings; most functions aren't, however. [Alternatively, we could make EVAL-FOR-EMACS be compiled with a high debug level, so it'll become restartable. That would be non-obvious to the user, though, and would only work on those implementations that implement SWANK-BACKEND:RESTART-FRAME.] * swank.lisp (call-with-retry-restart): New function. (with-retry-restart): New macro. (eval-for-emacs): Use WITH-RETRY-RESTART. 2008-09-09 Tobias C. Rittweiler A package "Foo.Bar.1.0" was truncated to "0>" as REPL prompt. It'll now be displayed as "Bar.1.0>". * swank.lisp (auto-abbreviated-package-name): Adapted accordingly. 2008-08-31 Helmut Eller * swank-backend.lisp (*gray-stream-symbols*): Remove stream-file-position because it's called stream-position in CCL. (make-fn-streams): Deleted. Update callers accordingly. 2008-08-30 Helmut Eller * swank-sbcl.lisp (receive-if): Add #+/-linux to avoid yet more WITH-TIMEOUT related problems. * swank-gray.lisp (slime-input-stream): Remove the output stream slot. Most of the time we can just call force-output. * slime.el [test](inspector): New test. * swank.lisp (prepare-part): Also wrap action elements in a list. Reported by Ariel Badichi and Madhu. 2008-08-30 Helmut Eller * slime.el (slime-pop-to-buffer): Drop the norecord argument, since we can't support it easily in Emacs 21. Reported by Christophe Rhodes. 2008-08-30 Michael Weber * swank-gray.lisp (make-input-stream): fixed typos 2008-08-30 Michael Weber * swank-backend.lisp (*gray-stream-symbols*): added symbols stream-peek-char, stream-read-line, stream-file-position 2008-08-30 Mark Evenson * swank-abcl.lisp (make-output-stream, make-input-stream): provide the (trivial) definitions for MAKE-OUTPUT-STREAM and MAKE-INPUT-STREAM for ABCL. 2008-08-27 Helmut Eller * slime.el (sldb-setup): Insert "No backtrace" if the backtrace is empty. 2008-08-27 Anton Vodonosov * swank-ecl.lisp: Add :load-toplevel and :execute to EVAL-WHENs to fix loading. 2008-08-27 Helmut Eller * swank-cmucl.lisp (remove-sigio-handlers): Fix thinko. * swank.lisp (decode-message): Don't ignore EOF. (swank-debugger-hook): Remove the default-debugger restart. 2008-08-25 Tobias C. Rittweiler * slime.el (slime-compute-modeline-package): Used `when-let' before its definition. (slime-compute-modeline-string): Display "PKG:" before "CON:". 2008-08-22 Helmut Eller Some focus handling in multiframe setups. * slime.el (slime-pop-to-buffer): New function. (slime-switch-to-output-buffer): Use it. 2008-08-22 Helmut Eller Use lazy lists in the inspector. * swank.lisp (lcons): New data type. (lcons*, lcons-car, lcons-cdr, llist-range): New functions. (emacs-inspect array): Use lazy lists. (istate>elisp): The istate.content is now be a lazy list. (iline): New utility. (prepare-range, prepare-part): Replaces inspector-content. 2008-08-22 Helmut Eller Implement streams with a length limit. Use them to truncate printer output in backtraces. * swank-backend.lisp (make-output-stream, make-input-stream): Split make-fn-streams up into two functions. * swank.lisp (call/truncated-output-to-string): New function. (backtrace, istate>elisp, to-line): Use it. (frame-locals-for-emacs): Use to-line. 2008-08-22 Helmut Eller In backtraces, escape newlines in strings as \n. * swank.lisp (*backtrace-pprint-dispatch-table*): New. (*backtrace-printer-bindings*): Use it. 2008-08-22 Stas Boukarev * metering.lisp: Add deftypes for time-type and cons-type, which are not defined in newer versions of CCL. 2008-08-22 Stelian Ionescu * swank-ecl.lisp: Add a few EVAL-WHENs to fix compilation. 2008-08-22 Helmut Eller Collect most of the inspector state in a structure. Truncate the printer output more aggressively. * swank.lisp (inspector-state): New structure. (*istate*): New variable holds the current state. (inspect-object, inspector-content, inspector-nth-part) (inspector-range, inspector-call-nth-action, describe-inspectee): Use it. (inspector-pop, inspector-next): Implemented forward/backward a bit differently. (emacs-inspect/printer-bindings, istate>elisp): New functions. (to-line, truncate-string): New functions. 2008-08-22 Tobias C. Rittweiler Compiling a file `let*.lisp' on SBCL via C-c C-k resulted in an error, because it parsed the asterisk to a wild pathname. Fix that. * swank-backend.lisp (definterface parse-emacs-filename): New. PARSE-NAMESTRING by default. * swank-sbcl.lisp (defimplementation parse-emacs-filename): Use SB-EXT:PARSE-NATIVE-NAMESTRING. * swank.lisp (compile-file-for-emacs): Use PARSE-EMACS-FILENAME. (compile-file-if-needed): Ditto. (load-file): Ditto. (swank-require): Ditto. 2008-08-18 Helmut Eller * swank.lisp (install-fd-handler): Bind *emacs-connection* with with-connection, for case when the signal hander is called out of the blue. (swank-debugger-hook): Don't assume that the hook argument is #'swank-debugger-hook itself. * test.sh (usage): Use cat rather not echo for here-documents. 2008-08-17 Helmut Eller * slime.el (slime-inspector-show-source): New command. (slime-inspector-mode-map): Bind it to ".". (sldb-highlight-sexp): Use slime-flash-region rather than a permanent overlay. (slime-popup-buffer-quit): Must call bury-buffer without argument. * swank.lisp (find-source-location-for-emacs): New function. * slime.el (slime-add-local-hook): Renamed from add-local-hook. (slime-switch-to-output-buffer): Drop the connection argument. It was never used. (slime-switch-to-output-buffer-search-all-frames): Deleted. Use display-buffer-reuse-frames instead. (slime-switch-to-output-buffer): Use pop-to-buffer to select the window and frame. 2008-08-15 Tobias C. Rittweiler * slime.el (slime-switch-to-output-buffer): Fix regression discovered by Ariel Badichi. Programmatic invocation of this function expect this function to also set-buffer to the REPL buffer. Even though that's ugly, we do it for now, and declare it to be a FIXME. (slime-dispatch-event): Don't use `message' for the pipelined request message, but `slime-display-oneliner' which will truncate the form to be displayed. 2008-08-17 Helmut Eller * swank-cmucl.lisp (waitpid): Don't use unix::pid-t, it's only defined for Linux. * swank-sbcl.lisp (sb-thread::get-foreground): Don't override. Let SBCL people fix this. 2008-08-17 B.Scott Michel * swank-loader.lisp (dump-image): Move this function to the end of the file to stop SBCL from reporting two times the same false alarm. 2008-08-15 Tobias C. Rittweiler * slime.el (slime-popup-buffer-quit): Fix regression; we have to invoke `bury-buffer' without an argument to make it switch buffers for us (for the case when the snapshot wasn't restored.) 2008-08-15 Tobias C. Rittweiler * slime.el (slime-list-compiler-notes): Only shrink if notes tree isn't displayed as being collapsed. 2008-08-15 Tobias C. Rittweiler * slime.el (slime-popup-buffer-quit): If not kill, then at least bury the buffer. (slime-list-compiler-notes): Shrink the compiler-notes window. 2008-08-14 Tobias C. Rittweiler If another frame is already displaying a REPL, `C-c C-z' will now select this window instead of splitting the current frame, and displaying the REPL in the newly created window. * slime.el (slime-switch-to-output-buffer-search-all-frames): New variable to customize this behaviour, as it may not be optimal for people using multiple screens at once. (slime-switch-to-output-buffer): Adapted accordingly. 2008-08-14 Tobias C. Rittweiler Xref buffers: `M-,' in an Xref buffer will now revert to an Emacs state as of before the Xref command. * slime.el (slime-xref-mode-map): Add `slime-xref-retract' as `M-,' (slime-xref-retract): New. Restores the emacs snapshot unconditionally. (slime-xref-quit): Use it. 2008-08-14 Tobias C. Rittweiler Xref buffers: `q', and `SPC' will push onto the find-definition stack such that M-, will work afterwards. * slime.el (defstruct slime-emacs-snapshot): Also save the point explicitly. It is implicitly stored already in the window-configuration, but inaccessible therein. (slime-current-emacs-snapshot, slime-set-emacs-snapshot): Adapted. (slime-push-definition-stack-from-snapshot): New. Reason for above changes. (slime-with-popup-buffer): Make sure that the current emacs-snapshot is taken, not only when the :emacs-snapshot argument is NIL at expansion time, but also on runtime. (slime-with-xref-buffer): The name of the Xref buffer was created at expansion time, but must be computed at runtime. Fix that. (slime-xref-quit): Use `slime-push-definition-stack-from-snapshot' (sime-xref-goto): Adapted to also push onto the stack. * slime.el (slime-compute-modeline-package): Cleaned up. (slime-update-modeline-string): Ditto. 2008-08-12 Helmut Eller Add a dump-image function to the loader. * swank-loader.lisp (dump-image): New. * swank-backend.lisp (save-image): New interface. * swank-cmucl.lisp, swank-clisp.lisp, swank-sbcl.lisp (save-image): Implemented. 2008-08-12 Helmut Eller * slime.el (slime-repl-send-input): Disable modification hooks when marking old input. (slime-check-version): Use y-or-n-p. 2008-08-12 Helmut Eller Finally handle reader-errors without disconnecting. * swank.lisp (decode-message): Convert reader-error conditions into :reader-error events. (dispatch-event): Send :reader-error events to Emacs. * slime.el (slime-dispatch-event): Display reader-errors. 2008-08-12 Helmut Eller * swank.lisp (with-buffer-syntax): Take package as argument. (defslimefun): Derive the package for exporting from the symbol. 2008-08-12 Helmut Eller Let SIGINT create a synthetic event. * swank.lisp (install-fd-handler,simple-serve-requests): Dispatch a :emacs-interrupt event in the SIGINT handler. * slime.el (slime-interrupt): Send nothing over the wire when SIGINT is used. 2008-08-11 Helmut Eller * test.sh: Use batch mode by default. 2008-08-11 Helmut Eller Improve interrupt safety for single-threaded lisps. * slime.el (slime-interrupt): Send a :emacs-interrupt message together with SIGINT. SIGINT now means "check for new events" instead of "invoke the debugger". * swank-backend.lisp (install-sigint-handler) (call-with-user-break-handler): New functions. * swank.lisp (simple-serve-requests,install-fd-handler): Use it. (read-packet): New function. Check for interrupts. (decode-message): Use it. (wait-for-event/event-loop): Check for interrupts. 2008-08-11 Helmut Eller * swank-abcl.lisp (preferred-communication-style): Return nil until we implement receive-if. * swank-openmcl.lisp (receive-if): Support timeout argument. * swank-allegro.lisp (receive-if): Ditto. 2008-08-11 Helmut Eller * swank.lisp (*global-debugger*): Change default back to t. 2008-08-10 Helmut Eller * swank-ecl.lisp (thread-id): Assign an non-nil id to unknown threads. * slime.el (slime-execute-tests): Call slime-test-should-fail-p before executing the test (which may close the connection). (def-slime-test): Use slime-sync-to-top-level with a timeout. (slime-temp-directory): New function. (slime-run-tests): Save repl-history in /tmp. (slime-repl-mode): Ignore persistent history if slime-repl-history-file is nil. (slime-quit-lisp-internal): New function. (slime-quit-lisp, slime-restart-inferior-lisp): Use it (slime-batch-test): Exit, if the Lisp isn't up and running after 30 secs. 2008-08-10 Helmut Eller * swank.lisp (wait-for-event): Add timeout argument. This is used for :fd-handler and :sigio style where we only process events as long as we don't block. (wait-for-event/event-loop, read-event) (decode-message, receive-if): Ditto. (process-requests): Renamed from read-from-emacs. (handle-requests): Renamed from handle-request. Take timeout argument. Update callers. (process-available-input): Deleted. (with-swank-error-handler): Renamed from with-reader-error-handler. (with-connection): Use it. 2008-08-10 Helmut Eller * swank.lisp (invoke-slime-debugger): New function. Analagous to cl:invoke-debugger. (swank-debugger-hook): Use it. 2008-08-09 Helmut Eller * slime.el (slime-quit-lisp): Optionally send kill signal. (slime-quit-connection-at-point): Disconnect after some timeout. 2008-08-09 Helmut Eller Fixes for heap dumping. * swank.lisp (*log-output*): Don't initialize at load-time, otherwise the stream would end up in a heap image. 2008-08-09 Helmut Eller * swank-lispworks.lisp (defimplementation): Record location. 2008-08-09 Helmut Eller * swank.lisp (*maximum-pipelined-output-chunks*): New variable 2008-08-09 Helmut Eller Display the "Use default debugger" restart more prominently for testing. * swank.lisp (swank-debugger-hook): Bind a user visible restart to invoke the native debugger. (*global-debugger*): Make this nil by default. (sldb-loop): Minor cleanups. (sldb-break-with-default-debugger): Invoke the native debugger on top of the slime debugger. * slime.el (slime-simple-completions): Bind slime-current-thread to t so that completion is peformed in a fresh thread. (sldb-setup): Always pop to the debugger buffer. (sldb-activate): Optionally select the window. * swank-sbcl.lisp (sb-thread::get-foreground): Override this as the default implementation is unusable for Slime. * swank-lispworks.lisp (environment-display-notifier): Just return t. 2008-08-09 Helmut Eller * swank-lispworks.lisp (disassemble-frame): Implemented. 2008-08-09 Tobias C. Rittweiler M-x slime doesn't destroy the window layout anymore when you switch windows/frames while the connection is being set up. * slime.el (slime-hide-inferior-lisp-buffer): Search for the inferior-lisp buffer's window in all frames. (slime-repl-update-banner): Do not pop to the REPL buffer. 2008-08-08 Tobias C. Rittweiler * slime.el: Fixing `q' in Xref buffers. (slime-popup-buffer-snapshot-unchanged-p): New. (slime-popup-buffer-restore-snapshot): New. (slime-xref-quit): Can't use slime-popup-buffer directly. Instead implement its own quit behaviour using the above functions. 2008-08-08 Helmut Eller Use wait-for-event instead of catch/throw where needed. * swank.lisp (read-user-input-from-emacs, y-or-n-p-in-emacs) (eval-in-emacs): Use wait-for-event. (make-tag): Replaces intern-catch-tag. (take-input): Deleted. (dispatch-event): Remove some redundancy. 2008-08-08 Tobias C. Rittweiler * slime.el: Make xref buffers use `slime-with-popup-buffer', nee `slime-with-temp-buffer'. (slime-with-xref-buffer): Rewritten using a popup buffer. (slime-init-xref-buffer): Removed. (slime-display-xref-buffer): Removed. 2008-08-08 Tobias C. Rittweiler * slime.el: Rename slime's temp-buffer to popup-buffer. 2008-08-08 Tobias C. Rittweiler * slime.el (slime-compiler-notes-mode, slime-connection-ist-mode): Add slime-temp-buffer-mode-map to docstring. 2008-08-08 Tobias C. Rittweiler * slime.el (slime-connections-buffer-name): New variable. (slime-list-connections): Use it. (def-slime-selector ?c): Ditto 2008-08-08 Tobias C. Rittweiler * slime.el: Make the threads browser use `slime-with-temp-buffer'. (slime-temp-buffer-quit-function): New buffer-local variable. Defaults to `slime-temp-buffer-quit'. (slime-temp-buffer-mode): `q' invokes above variable now. (slime-threads-buffer-name): New variable. (slime-list-threads): Use slime-with-temp-buffer. (slime-update-threads-buffer): New. Lifted from slime-list-threads. (slime-thread-quit): Renamed to slime-quit-threads-buffer. 2008-08-08 Helmut Eller Unify event dispatching for single and multi-threaded cases. * swank.lisp (send-to-control-thread,read-from-control-thread) (send-to-socket-io,read-from-socket-io): Deleted. (send-event, read-event, send-to-emacs) (signal-interrupt, use-threads-p): New functions. And more random changes. 2008-08-08 Helmut Eller Spawn the auto-flush thread in the front end. This removes some copy&paste code in various backends. * swank.lisp (auto-flush-loop): New function. (open-streams): Use it. * swank-backend.lisp (make-stream-interactive): Deleted. 2008-08-08 Helmut Eller * slime.el (test disconnect): Call slime-inferior-process with explicit connection argument to avoid clashes with buffer-local connections. 2008-08-08 Tobias C. Rittweiler * slime.el (slime-create-macroexpansion-buffer): Make fontifying case insensitive as the result from macroexpansion is most likely printed all upper-case. 2008-08-07 Helmut Eller * slime.el (slime-with-temp-buffer): By default, no longer inherit the current connection. 2008-08-07 Tobias C. Rittweiler Previously, M-p at the REPL deleted the input if no match could be found in the history. Now the input is untouched. * slime.el (slime-repl-history-replace): Ditch delete-at-end-p argument. (slime-repl-next-input, slime-repl-previous-input): Adapted. (slime-repl-forward-input, slime-repl-backward-input): Ditto. 2008-08-07 Helmut Eller * slime.el (slime-with-temp-buffer): Renamed from slime-with-output-to-temp-buffer. Initialize the buffer local buffer variables before and after running BODY, so that we don't need the mode argument. 2008-08-07 Tobias C. Rittweiler * slime.el (def-slime-test narrowing): Adapted to recent changes of `slime-with-output-to-temp-buffer'. 2008-08-07 Tobias C. Rittweiler Mode-Line will now display a buffer's connection, and a buffer's package. Furthermore, stale connections will also be indicated. * slime.el: (slime-update-modeline-package): Renamed to `slime-extended-modeline'. (slime-modeline-string), (slime-modeline-connection-name), (slime-modeline-connection-state): New variables. (slime-update-modeline-package): Renamed to `slime-compute-modeline-package'. (slime-compute-modeline-connection): New. (sime-compute-modeline-connection-state): New. (slime-compute-modeline-string): New. (slime-update-modeline-string): New. (slime-shall-we-update-modeline-p): New. (slime-update-modeline): New. Run periodically by idle timer. (slime-mode, slime-temp-buffer-mode): Install extended mode-line. (slime-stale-connection-p, slime-debugged-connection-p): New. (slime-compute-connection-state): New. (slime-connection-state-as-string): New. (slime-state-name): Removed. (slime-set-state): Removed. (slime-length>): Fix typecase. 2008-08-07 Helmut Eller * swank-allegro.lisp, swank-cmucl.lisp, swank-scl.lisp (receive-if): Periodically check for interrupts. 2008-08-06 Nikodemus Siivola * swank-sbcl.lisp (handle-notification-condition): resignal warnings as-is before replacing with COMPILER-CONDITION so that handlers higher up the stack can muffle them should they choose to. This silences redefinition warnings for definitions inside EVAL-WHEN :COMPILE-TOPLEVEL in newish SBCLs when compiling the file for a second time. (call-with-compilation-hooks): STYLE-WARNINGs are WARNINGs, and don't need a separate handler. 2008-08-06 Helmut Eller * swank-sbcl.lisp (short-backtrace): New function. (thread-description): Use it. * slime.el (slime-show-apropos): Use lisp-syntax-table to make M-. more useful. 2008-08-06 Helmut Eller Queue interrupts in various places. * swank-backend.lisp (*pending-slime-interrupts*): New variable. (check-slime-interrupts): New function. * swank-lispworks.lisp (receive-if): Use it. * swank-sbcl.lisp, swank-openmcl.lisp: Ditto. * swank.lisp (*slime-interrupts-enabled*): New variable. (with-slime-interrupts, without-slime-interrupts): New macros. (invoke-or-queue-interrupt): New function. (interrupt-worker-thread, eval-for-emacs, swank-debugger-hook) (debug-nth-thread, wait-for-event, read-from-emacs): Use them. 2008-08-05 Helmut Eller * slime.el (slime-with-output-to-temp-buffer): Make sure that we don't make the wrong buffer read-only. * swank-lispworks.lisp (make-stream-interactive): Run our own thread to periodically flush streams instead of relying on soft-force-output. * swank.lisp (encode-message): Inhibit interrupts while writing the length and the body. * swank-backend.lisp (make-recursive-lock) (call-with-recursive-lock-held): Deleted. Make the default locks "recursive" instead. (thread-id): Add a default implementation which works with the default implementation of current-thread. * swank-gray.lisp (stream-write-string): New method. * swank-backend.lisp (*gray-stream-symbols*): Include write-string. 2008-08-04 Helmut Eller * swank-gray.lisp (slime-output-stream): Undo last change. Make force-output and finish-output do the same. 2008-08-04 Masayuki Onjo Updates for CLISP-2.46. * swank-clisp.lisp (fspec-pathname, fspec-location): The structure of (documentation symbol 'sys::file) used to be (path . lines) but is now ((type path . lines) ...). 2008-08-04 Helmut Eller * swank-gray.lisp (slime-output-stream): Add a slot "interactive-p" which should be true for streams which are flushed periodically by the Lisp system. Update the relevant backends accordingly. * swank-scl.lisp (receive-if): Implemented. * swank-cmucl.lisp (receive,receive-if): Test for new messages in a loop. * swank.lisp (eval-for-emacs): Don't flush streams here as that may now block. * swank-lispworks.lisp (receive-if): Handle interrupts. * slime.el (slime-repl-clear-buffer): Delete stuff after the prompt too. (slime-with-output-to-temp-buffer): Add read-only argument. (slime-temp-buffer): Renamed from slime-get-temp-buffer-create. Drop noselect argument. 2008-08-03 Helmut Eller Add some flow-control. * swank.lisp (make-output-function): Synchronize with Emacs on every 100th chunk of output. (wait-for-event,wait-for-event/event-loop,event-match-p): New functions. Used to selectively wait for some events and to queue the other events. (dispatch-event, read-from-socket-io): Tag non-queueable events with :call. (read-from-control-thread, read-from-emacs): Process :call events only; enqueue the others. (*log-output*): Don't use synonym-streams here. Dereference the symbol until we get at the real stream. (log-event): Escape non-ascii characters more carefully. * swank-backend.lisp (receive-if): New function. Update backends accordingly. (not yet for ABCL and SCL) * slime.el (slime-dispatch-event): Handle ping event. 2008-08-03 Tobias C. Rittweiler * slime.el: Make code related to temp buffers more consistent. (slime-with-output-to-temp-buffer): Docstring update. New keyarg :connection to specify whether the current connection should be stored buffer-locally. New key arg :emacs-snapshot to explicitly pass the snapshot to be stored. The created buffer is not automatically set to slime-mode anymore. (slime-temp-buffer-mode): Add `C-c C-z', and `M-.' bindings to all temp buffers. (slime-list-compiler-notes): Use `slime-with-output-to-...', rename the buffer from "*compiler notes*" to "*SLIME Compiler-Notes*". (slime-compiler-notes-mode-map): Remove explicit binding of "q", as it's inherited from the temp buffer. (slime-edit-value-callback): Use `slime-with-output-to-...'. (slime-show-apropos): Adapted to above changes. (slime-macroexpansion-minor-mode): Removed "q" binding, as it's inherited. (slime-eval-macroexpand): Adapted. Rename buffer from "*SLIME macroexpansion*" to "*SLIME Macroexpansion*". (slime-list-connections): Use `slime-with-output-to-...', rename buffer from "*SLIME connections*" to "*SLIME Connections*". 2008-07-27 Tobias C. Rittweiler * slime.el (make-slime-buffer-location): New. (make-slime-file-location): New. 2008-07-29 Richard M Kreuter Environment variables for Lisp process. * slime.el (slime-start, slime-maybe-start-lisp) (slime-reinitialize-inferior-lisp-p, slime-start-lisp) (slime-restart-sentinel): Pass new parameter "env" through. 2008-07-29 Richard M Kreuter * swank-sbcl.lisp (add-sigio-handler, add-fd-handler): Be quiet as a workaround for non-properly initialized *debug-io*. 2008-07-29 Richard M Kreuter Fix slime-quit-lisp in non-default REPL buffer. * slime.el (slime-quit-lisp): Killing the REPL buffer also removes the buffer local binding of slime-buffer-connection. Remember the connection before killing the buffer. 2008-07-27 Tobias C. Rittweiler * swank.lisp (swank-compiler): Fix bug when invoking an abort restart on a failed compilation attempt. * swank-sbcl.lisp (swank-compile-string): If a compilation attempt fails, COMPILE-FILE returns NIL which we tried to LOAD. Fix that. * swank-backend.lisp (swank-compile-string, swank-compile-file): Document return value. 2008-07-23 Tobias C. Rittweiler * swank-loader.lisp (*contribs*): Added `swank-package-fu'. 2008-07-23 Tobias C. Rittweiler * slime.el (slime-at-list-p): New. Returns t if point is at a list. (slime-at-expression-p): New. Similiar to `slime-in-expression-p'. (slime-end-of-list): New. Pendant to `slime-beginning-of-list'. 2008-07-19 Tobias C. Rittweiler REPL shortcuts now leave an appropriate Common Lisp form in the REPL history. * slime.el (slime-within-repl-shortcut-handler-p): New global. T if truly inside a repl shortcut handler invoked by ,foo on the REPL. (slime-handle-repl-shortcut): Bind above global appropriatly. (slime-repl-shortcut-eval): New; should be used in repl shortcut handlers instead of `slime-eval'. (slime-repl-shortcut-eval-async): New; should be used in repl shortcut handlers instead of `slime-eval-async'. (defslime-repl-shortcut): Update docstring. (slime-repl-set-package): Use slime-repl-shortcut-eval. (slime-set-default-directory): Ditto. (slime-sync-package-and-default-directory): Ditto. 2008-07-18 Tobias C. Rittweiler * slime.el (slime-recompile-locations): Locations were potentially recompiled within a wrong package. Fix that. 2008-07-18 Tobias C. Rittweiler An explicit numeric value as prefix-arg given to `C-c C-c' will now represent the debug level the defun is compiled with; `C-u C-c C-c' defaults to maximum debug like before. (Now also works for recompilation commands in xref buffers.) * slime.el (slime-compilation-debug-level): Renamed from `slime-compile-with-maximum-debug'. (slime-normalize-optimization-level): New. (slime-compile-defun): Adapted accordingly. (slime-compile-region): Ditto. (slime-recompile-location): Added setting of debug-level. (slime-recompile-locations): Ditto. (slime-recompile-xref): Now takes debug-level prefix-arg. (slime-recompile-all-xrefs): Ditto. * swank-sbcl.lisp (defimplementation swank-compile-string): Adapted accordingly. 2008-07-16 Tobias C. Rittweiler * slime.el (slime-xref-dspec-at-point): Make more robust. (slime-xref-insert-recompilation-flags): Ditto. (slime-column-max): New. 2008-07-16 Tobias C. Rittweiler Recompilation support added to xref buffers. You can now use `C-c C-c' in an xref buffer to recompile the defun represented by the xref at point. Similiarly, you can use `C-c C-k' to recompile all xrefs displayed. For example, if you've changed a macro, and want to recompile all the functions in the image which use that macro, you first call `slime-who-macroexpands' (C-c C-w RET), and then issues `C-c C-k' in the xref buffer that just popped up. [There's no guarantee that this will actually recompile all functions that depend on the changed macro, as this obviously depends on the quality of the backend's WHO-MACROEXPANDS implementation.] * swank.lisp: Introduced the notion of a SWANK-COMPILATION-UNIT, so we're able to compile different stuff comming from Slime one after the other, and have compiler notes &c. collected in a contiguous manner. (defstruct :swank-compilation-unit): New. Contains compilation notes, compilation results, etc. (*swank-compilation-unit*): New. Current Swank Compilation Unit. (with-swank-compilation-unit): New. Like WITH-COMPILATION-UNIT. (swank-compilation-unit-for-emacs): New. (swank-compiler): Adapted; collect compilation stuff into the current swank-compilation-unit. (compile-string-for-emacs): Use WITH-SWANK-COMPILATION-UNIT. (compile-file-for-emacs): Ditto. (*compiler-notes*, clear-compiler-notes): Removed. (compiler-notes-for-emacs): Removed. * slime.el (slime-compilation-unit, slime-last-compilation-unit), (slime-compiler-notes, slime-compiler-results): New/Adapted. (slime-make-compile-expression-for-swank): Factored out from `slime-compile-string'. (slime-recompile-location): New. (slime-recompile-locations): New. (slime-pop-to-location): &optional `where' arg can now also be 'excursion to only reset the current-buffer, but not switch. (slime-xref-mode-map): Add `C-c C-c' and `C-c C-k'. (slime-xref-dspec-at-point): New. (slime-all-xrefs): New. (slime-recompile-xref): New. (slime-recompile-all-xrefs): New. (slime-make-xref-recompilation-cont): New. (slime-xref-inert-recompilation-flags): New. (slime-trim-whitespace): New utility. 2008-07-05 Tobias C. Rittweiler * swank.lisp: Revert Melis' change from 2008-07-04; Global IO redirection seems currently to be broken, and while it's not due to that commit (it seems that it's been broken since longer), I want to be on a safe bet. 2008-07-05 Tobias C. Rittweiler `M-x slime-lisp-threads' will now contain a summary of what's currently executed in a thread that was created by Swank. * swank-backend.lisp (thread-description, set-thread-description): New interface functions to associate strings with threads. * swank-sbcl.lisp (thread-description, set-thread-description): Implemented. * swank.lisp (call-with-thread-description), (with-thread-description): New. (read-from-emacs): Now temporarily sets the thread-description of the current thread to a summary of what's going to be executed by the current request. (defslimefun list-threads): Changed return value to also contain a thread's description. * slime.el (slime-list-threads, slime-thread-insert): Adapted to new return value of LIST-THREADS. 2008-07-04 Gábor Melis * swank.lisp (call-with-redirected-io): Rebind only standard streams if *GLOBALLY-REDIRECT-IO*. Fixes lost output after disconnect, reconnect. 2008-07-04 Willem Broekema * slime-allegro.lisp (fspec-definition-locations): Workaround for the issue that Allegro does not record the source file location for methods defined inside a defgeneric form. The idea is that if the source location of a method is not found, then the defgeneric form is almost certainly the right place. 2008-07-04 Tobias C. Rittweiler * slime.el (slime-call-defun): Properly signal error message when used in a context that is not a function definition. 2008-07-04 Richard M Kreuter * swank-sbcl.lisp (code-location-source-location), (code-location-debug-source-name): Patched for incompatible structure change in SBCL 1.0.18.10. 2008-07-04 Tobias C. Rittweiler * slime.el (slime-call-defun): Broken on DEFMETHOD forms. Fix that. Also, don't insert package qualifier anymore if the inserted qualifier is the same as the current REPL package. 2008-07-02 Martin Simmons * swank-lispworks.lisp (install-debugger-globally): hook into the environment globally to catch BREAK. 2008-06-07 Tobias C. Rittweiler * slime.el (def-slime-test find-definition.2, arglist): SWANK:COMPILE-STRING-FOR-EMACS since recently takes 5 instead of 4 parameters. Fix that. 2008-06-07 Tobias C. Rittweiler * slime.el (slime-extract-context, slime-parse-context): Recognize more toplevel forms, e.g. DEFINE-COMPILER-MACRO &c. Such that `slime-parse-toplevel-form' will also recognize these. (slime-trace-query): Adapted to above changes. Errors if spec is untraceable. (slime-call-defun): Adapted to also support the new toplevel forms. (slime-cl-symbol-name), (slime-cl-symbol-package), (slime-qualify-cl-symbol-name): Resurrected from the `slime-parse' contrib, as they've been used by `slime-call-defun'. 2008-06-02 Raymond Toy Unicode support for CMUCL. * swank-cmucl.lisp (accept-connection, make-socket-io-stream): Handle external-format argument. (find-external-format): Implemented. (*external-format-to-coding-system*): New variable. 2008-05-19 Helmut Eller * swank-sbcl.lisp: Don't require asdf. 2008-05-19 Helmut Eller * swank-sbcl.lisp (swank-compile-string): Add reader-conditionals for sb-ext::restrict-compiler-policy. 2008-05-19 Geo Carncross * contrib/swank-asdf.lisp: Require asdf. 2008-05-17 Helmut Eller * slime.el (slime-prin1-to-string): Bind print-length and print-level. 2008-05-17 Helmut Eller * slime.el (slime-inspector-limit): New variable. (slime-inspector-insert-content): Use it. (slime-inspector-fetch-chunk, slime-inspector-fetch) (slime-inspector-next-range, slime-inspector-join-chunks): New. 2008-05-08 Geo Carncross * swank-ecl.lisp (call-with-debugging-environment) (frame-decode-env): Bugfix: qualify fixnump 2008-05-01 Geo Carncross * swank-ecl.lisp (call-with-debugging-environment) (is-ignorable-fun-p, is-swank-source-p, in-swank-package-p): Trim swank sources from the ECL backtrace. 2008-04-30 Geo Carncross * swank-ecl.lisp (call-with-debugging-environment) (in-swank-package-p): Remove frames from the backtrace that are in a swank package as those are misleading. Fixup locals display. 2008-04-29 Geo Carncross * swank-ecl.lisp: Backtrace and frame/eval improvements 2008-04-24 Tobias C. Rittweiler * swank-backend.lisp: Clarified docstrings of interface functions in the Debugging section. 2008-04-23 Geo Carncross * swank-source-file-cache.lisp (skip-comments-and-whitespace): Include #\Page as whitespace * swank-ecl.lisp (find-source-location): Initial support for find-source-location with functions (flush-streams): Workaround differences in different ECL versions (find-definitions): basic/simple implementation of find-definitions * swank-loader.lisp (*sysdep-files*): Include swank-source-path-parser and swank-source-file-cache for ECL 2008-04-17 Travis Cross * swank.asd: Don't make a compile-op a no-op so that a swank-loader.fasl file gets generated and (require 'swank) can be called multiple times. 2008-04-17 Zach Beane C-c C-c with prefix args now uses the maximal debug level. Only implemented for SBCL. * slime.el (slime-compile-with-maximum-debug): New variable. (slime-compile-defun, slime-compile-region): Use it. * swank.lisp (compile-string-for-emacs): Accept new debug argument. Update backend accordingly. 2008-04-17 Helmut Eller * slime.el (slime-set-default-directory): Send absolute filenames. 2008-04-06 Tobias C. Rittweiler * slime.el (slime-edit-definition): The `slime-edit-definition-hooks' are now invoked with the same args as `slime-edit-definition'. 2008-03-27 Martin Simmons * swank-lispworks.lisp (map-error-database): Make mapping work for LispWorks 5.1 too. 2008-03-26 Tobias C. Rittweiler On SBCL, (block outta (let ((*debugger-hook* #'(lambda (c hook) (declare (ignore hook)) (return-from outta 42)))) (error "FOO"))) would just silently skip over the *DEBUGGER-HOOK*, and pop right into SLDB to handle the error. Fix that. * swank-sbcl (make-invoke-debugger-hook): New function; returns a hook for SB-EXT:*INVOKE-DEBUGGER-HOOK* that checks for the presence of *DEBUGGER-HOOK*, and calls that if available. (install-debugger-globally): Use it. (call-with-debugger-hook): Ditto. (getpid): Declaim return type explicitly, to make SBCL shut up about being unable to optimize %SAP-ALIEN in ENABLE-SIGIO-ON-FD. * slime.el (def-slime-test break): Test additionally that BREAK turns into SLDB even when *DEBUGGER-HOOK* is locally bound. (def-slime-test locally-bound-debugger-hook): New test case; tests that a locally-bound *DEBUGGER-HOOK* is adhered, and not skipped. 2008-03-26 Helmut Eller By default, don't ask if SLIME should be started. * slime.el (slime-auto-connect): New variable. (slime-auto-connect): New function. (slime-connection): Use it. 2008-03-24 Helmut Eller * slime.el (slime-check-version): New function. Make the prompt fit in a single line. * swank-loader.lisp (load-swank): Call swank::before-init. * swank.lisp (before-init): New function. (init): Renamed from setup. 2008-03-24 Tobias C. Rittweiler * HACKING: Updated due to broken links. Reported by Mirko Vukovic. 2008-03-24 Tobias C. Rittweiler * slime.el (slime-set-connection-info): Display SLIME and SWANK versions explicitly in Protocol Mismatch message. Adapted from idea and patch by Jeronimo Pellegrini. 2008-03-24 Tobias C. Rittweiler * swank-source-path-parser.lisp The source parser READs in files, and if such a file contains some nasty #. hackery that results in an error being signalled, M-. would fail on anything that's defined in those files. Fix that by using a special #. reader function that invokes the original #. reader with an IGNORE-ERRORS wrapped around. (make-sharpdot-reader): New function. (make-source-recording-readtable): Use it and install it on #. * slime.el (find-definition.2): New test case to guard against it. 2008-03-18 Geo Carncross * swank-ecl.lisp: ECL moved gray streams into GRAY package. 2008-03-18 Helmut Eller * slime.el (slime-xref-group): Handle :zip files. 2008-03-17 Tobias C. Rittweiler * swank-source-path-parser.lisp: Multibyte characters in files could screw up compiler-notes highlighting on SBCL. Fix that. (skip-toplevel-forms): Abstracted out from READ-SOURCE-FORM. (source-path-file-position): Don't operate on the file stream directly, since CL:FILE-POSITION may not return character but binary offsets on such streams; instead slurp file content into a buffer string, and operate on that. 2008-03-16 Tobias C. Rittweiler * swank.lisp (load-file-set-package): Removed; the function was only used in `slime-load-file-set-package' which invokes `slime-repl-set-package' which set the package for a second time. * slime.lisp (slime-load-file-set-package): Don't call SWANK:LOAD-FILE-SET-PACKAGE, but merely call SWANK:LOAD-FILE, then invoke `slime-repl-set-package' which will set the package. (slime-pretty-find-buffer-package): Removed. (Nowhere used.) (slime-set-package): Ditto. 2008-03-14 Helmut Eller Remove some rarely used code. * slime.el (with-lexical-bindings): Removed. Updated callers accordingly. (slime-make-default-connection, slime-choose-connection) (slime-find-connection-by-name, slime-symbol-at-point): Remove. Unused code. (slime-obsolete-commands, slime-bind-obsolete-commands) (slime-bind-obsolete-command, slime-upgrade-notice) (slime-timebomb, slime-timebomb-progress, slime-timebomb-message): Remove. Obsolete. 2008-03-14 Helmut Eller Move filename translation code to contrib. * slime.el (slime-find-filename-translators) (slime-filename-translations): Move to contrib/slime-tramp.el. (slime-to-lisp-filename-function) (slime-from-lisp-filename-function): New variables. 2008-03-14 Helmut Eller * slime.el (slime-repl-return-behaviour): Deleted. Rebind the key if you don't like what the command does. 2008-03-14 Tobias C. Rittweiler * swank.lisp (classify-symbol, symbol-classification->string): Add classification of symbols denoting type specifier, and denoting constants. 2008-03-13 Tobias C. Rittweiler * slime.el (slime-eval-macroexpand): Indent expansion. 2008-03-13 Tobias C. Rittweiler * slime.el (slime-edit-definition-cont): If no definition could be found, print also the package name in the error message where the definition was tried to be found in. 2008-03-13 Helmut Eller * slime.el (slime-region-for-defun-function): Deleted. (slime-region-for-defun-at-point): Use beginning-of-defun and not beginning-of-sexp. (slime-flash-region): New function. (slime-compile-region): Use it. 2008-03-13 Helmut Eller * slime.el (slime-xref-group): Renamed from slime-location-to-string. Handle source-form locations. 2008-03-12 Helmut Eller * slime.el (slime-find-definitions-function): Renamed from slime-edit-definition-fallback-function. (slime-find-definitions): Use it. (slime-find-tag-if-tags-table-visited): Deleted. 2008-03-12 Helmut Eller * slime.el (slime-inspector-operate-on-point): Signal an error if there is no object to operate on. 2008-03-08 Helmut Eller * slime.el (sldb-toggle-details): Inhibit point-motion-hooks. This is a workaround for problems with the --more-- field. 2008-03-07 Helmut Eller Be GC friendlier when parsing net packets. * slime.el (slime-net-read): Instead of consing a fresh string, use narrow-to-region and read the packet out of the buffer. 2008-03-04 Helmut Eller * test.sh: Updated for Emacs 23. 2008-03-04 Andreas Fuchs * swank.asd (asdf:output-files, asdf:perform): Make compile-op on swank-loader-file a noop. 2008-03-02 Tobias C. Rittweiler * slime.el (slime-edit-definition-hooks): This variable can be used to hook into the M-. machinery. (slime-edit-definition): Run above hooks until one succeeds. By default, try to find a definition for the symbol at point. 2008-02-28 Tobias C. Rittweiler * swank.lisp (find-definition-for-thing): New DEFSLIMEFUN. * swank-backend (find-source-location): New DEFINTERFACE. * swank-sbcl (find-source-location): Implement it. * slime.el (slime-edit-definition-cont): Use `slime-length='. 2008-02-28 Tobias C. Rittweiler Fix regressions in the `find-definition' test case on SBCL: M-. on e.g. SWANK::READ-FROM-EMACS would bring the user to (|defun read-from-emacs ...) and not |(defun read-from-emacs ...) * swank-sbcl.lisp (source-file-position): Don't 1+ the returned position; i.e. return a position usable as a CL /file position/ which start from 0, and not a position usable in Emacs where buffer points start from 1. This is important because the return value is passed to SWANK-BACKEND::READ-SNIPPET which invokes CL:FILE-POSITION on it. (make-definition-source-location): Adapted to 1+ the position passed to Emacs, to reflect above change. 2008-02-25 Helmut Eller Make it easier to prepare core-files. * swank-loader.lisp (init): Two new keyword args: :SETUP and :LOAD-CONTRIBS. :SETUP=nil can be used to suppress init hooks and loading user init files. * swank.asd: Call swank-loader:init with :SETUP=nil. * swank.lisp (init-global-stream-redirection): Guard against redirecting already redirected streams. 2008-02-24 Helmut Eller Work harder to avoid wrong guesses for slime-repl-set-package. * slime.el (slime-repl-set-package): Use slime-pretty-package-name to strip double quotes from slime-current-package before comparing it with slime-lisp-package. Still doesn't deal with nicknames and other reader tricks. 2008-02-23 Ariel Badichi Allow ED-IN-EMACS to edit new files. * swank.lisp (ed-in-emacs): Accept non-existing files. (canonicalize-filename): Merged into ed-in-emacs. 2008-02-23 Nikodemus Siivola If there is no connection, offer the option to start SLIME. * slime.el (slime-connection): Ask and maybe start SLIME. (slime-selector-method: ?r): No need to ask here any more. 2008-02-23 Helmut Eller In the inspector, show one-element lists as list not as pair. * swank.lisp (emacs-inspect cons) 2008-02-23 Zach Beane Add customization variable for the `slime-connect' port. * slime.el (slime-port): New variable. 2008-02-22 Mark Evenson * swank-abcl.lisp (getpid): Return '0' in case of error. Apparently needed bacause $PPID isn't not a standard feature. "[T]his is not a disentanglement from, but a progressive knotting into." 2008-02-22 Mark Harig Fix typos: "contribs" -> "contrib". * slime-autoloads.el (slime-setup-contribs): * slime.el (slime-setup): 2008-02-22 Mark Harig Fixes for CLISP 2.44. * swank-clisp.lisp (sldb-backtrace, %parse-stack-values): sys::frame-up-1 no longer exists; use sys::frame-up instead. 2008-02-22 Helmut Eller * slime.el (slime-pop-to-location): Slight cleanups. (slime-goto-xref, slime-goto-next-xref): Use it. 2008-02-22 Helmut Eller Remove save-restriction-if-possible. * slime.el (save-restriction-if-possible): Deleted. It was only used in one place. (slime-goto-source-location): Obey widen-automatically. (slime-location-offset): New function. 2008-02-21 Tobias C. Rittweiler * slime.el (slime-location-to-string): New function. (slime-analyze-xrefs): Use it; display definitions defined interactively via C-c C-c as comming from # instead of foo.lisp. 2008-02-20 Helmut Eller Better factorization for M-. and xref commands. * slime.el (slime-xref): Renamed from slime-definition. (slime-location, slime-location-p): New ADT def. (slime-xref-has-location-p, slime-analyze-xrefs): New functions. This work used to be done on the Lisp side. (slime-pop-to-location): New function. (slime-edit-definition, slime-edit-definition-cont): Simplified. (slime-find-definitions): New function. (slime-goto-definition, slime-goto-definition-other-window) (slime-pop-to-other-window, slime-show-definitions): Deleted. (slime-insert-xrefs): Simplified. (slime-insert-xref-location): Deleted. No need to show the filename twice. * swank.lisp (find-definitions-for-emacs, xref): Use common representation for "definitions" and "xrefs". (xref>elisp): New helper. (group-xrefs, alistify, parition, location-position<, xref-position) (xref-buffer, location-valid-p): Deleted. This work is now done on the Emacs side. 2008-02-20 Helmut Eller Emit a warning if the SWANK package already exists. * swank-loader.lisp (init): Issue a warning when SWANK will not be reloaded. 2008-02-18 Helmut Eller Minor cleanups for inspector code. * swank.lisp (inspector-content, inspect-list-aux): Slight cleanups. 2008-02-17 Marco Baringer * swank.asd: Update for recent changes to swank-loader.lisp, we need to call swank-loader::init after loading. 2008-02-16 Helmut Eller In the REPL, mark the trailing newline also as input. * slime.el (slime-repl-send-input): Mark the newline with the 'slime-repl-old-input property. (slime-repl-grab-old-input): Strip the newline. 2008-02-16 Helmut Eller Split loading and initialization (again). * swank-loader.lisp (init): New. Delete old packages only if explicitly requested. Also, if the swank package already exists don't load swank again. (setup): New function. * swank.lisp (setup): New function. Moved over here from swank-loader.lisp. * slime.el (slime-init-command): Call swank-loader:init. 2008-02-10 Helmut Eller Remove remaining traces of make-default-inspector. * swank-scl.lisp (make-default-inspector, scl-inspector): Deleted. * swank-lispworks.lisp (make-default-inspector) (lispworks-inspector): Deleted. 2008-02-09 Helmut Eller Drop the first return value of emacs-inspect. * swank.lisp (emacs-inspect): Drop the first return value. It wasn't used anymore. Update all methods and callers. 2008-02-09 Helmut Eller Remove obsolete *slime-inspect-contents-limit*. * swank.lisp (*slime-inspect-contents-limit*): Deleted and all its uses. The new implementation isn't specific to hash-tables or arrays. 2008-02-09 Helmut Eller Limit the length of the inspector content. That's similar to the limitation of the length of backtraces in the debugger. * swank.lisp (*inspectee-content*): New variable. (content-range): New function. (inspect-object): Use it with a length of 1000. (inspector-range): New function. Called from Emacs. * slime.el (slime-inspector-insert-content) (slime-inspector-insert-range, slime-inspector-insert-range-button) (slime-inspector-fetch-range): New functions. (slime-inspector-operate-on-point): Handle range-buttons. 2008-02-09 Helmut Eller Make slime-property-bounds more useful. * slime.el (slime-property-bounds): Remove special casing for whitespace at the end. (slime-repl-send-input): Don't mark the newline with the slime-repl-old-input property. (sldb-frame-region): Use slime-property-bounds. 2008-02-09 Helmut Eller Inspector cleanups. * swank.lisp (emacs-inspect): Renamed from inspect-for-emacs. Changed all method-defs accordingly. (common-seperated-spec, inspector-princ): Moved to swank-fancy-inspector.lisp. (inspector-content): Renamed from inspector-content-for-emacs. (value-part): Renamed from value-part-for-emacs. (action-part): Renamed from action-part-for-emacs. (inspect-list): Renamed from inspect-for-emacs-list. (inspect-list-aux): New. (inspect-cons): Renamed from inspect-for-emacs-simple-cons. (*inspect-length*): Deleted. (inspect-list): Ignore max-length stuff. (inspector-content): Don't allow nil elements. (emacs-inspect array): Make the label of element type more consistent with the others. 2008-02-09 Helmut Eller Cleanup slime-repl-set-package. * slime.el (slime-repl-set-package): Make it fit within 80 columns. 2008-02-05 Marco Baringer * slime.el (slime-search-buffer-package): Ask the lisp to read the in-package form so that we properly deal with #+foo and |WHATEVER| package names. (slime-repl-set-package): Only prompt with a default package if the repl's package is different from the current package. 2008-02-04 Marco Baringer * swank-openmcl.lisp (ccl::advise ccl::break): advise the lower-level ccl::cbreak-loop instead of cl:break. (frame-locals): If the value is a value-cell (a closed over value) show the closed over value and not the value cell. (disassemble-frame): add in x86-64 code. * slime-autoloads.el (slime-setup-contribs): Add contribs directory to load-path. * slime.el (slime-setup): Add contribs directory to load-path. * swank-abcl.lisp, swank-allegro.lisp, swank-backend.lisp, swank-clisp.lisp, swank-cmucl.lisp, swank-corman.lisp, swank-ecl.lisp, swank-lispworks.lisp, swank-openmcl.lisp, swank-sbcl.lisp, swank-scl.lisp, swank.lisp, contrib/swank-fancy-inspector.lisp: Remove second argument from swank:inspect-for-emacs. This functionality, choosing an inspector at runtime, was never actually used and is, now, needless complexity. 2008-02-04 Helmut Eller Simpler code to bind 0-9 in the debugger. * slime.el (sldb-mode-map): When binding the keys 0-9, use eval instead of two macros. 2008-02-04 Helmut Eller Move some functions to swank-arglist.lisp. * swank.lisp (length=, ensure-list, recursively-empty-p) (maybecall, exactly-one-p, read-softly-from-string) (unintern-in-home-package, valid-function-name-p): Moved to contrib/swank-arglist.lisp. 2008-02-03 Marco Baringer * swank.lisp (*sldb-condition-printer*): New variable. (safe-condition-message): Use the current binding of *sldb-condition-printer* to print the condition to a string. * slime.el (sldb-invoke-restart-by-name): New function. Invokes a restart by name, uses completion to read restart's name. (slime-define-keys sldb-mode-map): Bind sldb-invoke-restart-by-name to I in sldb buffers. * swank-loader.lisp: When loading swank delete all swank packages first. This protects the lisp from broken reloads of swank. Leave the swank-loader package so that users can set *fasl-directory* and *source-directory* as per the documentation. (lisp-version-string): On openmcl use the full cl:lisp-implementation-version, ccl::*openmcl-major-version* and ccl::*openmcl-minor-version* aren't sufficently precise to notice changes in openmcl's cvs. 2008-01-27 Helmut Eller Make it easier to start a non-default Lisp from ELisp code. * slime.el (slime): If the argument is a symbol start the corresponding entry in slime-lisp-implementations. Typical use is something like: (defun cmucl () (interactive) (slime 'cmucl)) 2008-01-22 Luís Oliveira * swank-source-path-parser.lisp (make-source-recording-readtable): don't suppress the #. reader macro. (read-and-record-source-map): don't bind *read-eval* to nil. (suppress-sharp-dot): unused, delete it. * slime.el (test compile-defun): test with #+#.'(:and). 2008-01-21 Helmut Eller * slime.el (sldb-mode): Don't throw to toplevel in the kill-buffer-hook, since the buffer can be killed for other reasons too. (test break): Test BREAK and CONTINUE in a loop. (slime-wait-condition): Display the current time. 2008-01-20 Matthias Koeppe New hooks that allow the slime-presentations contrib to hook into the debugger and inspector. * slime.el (sldb-insert-frame-variable-value-function): New variable. (sldb-insert-frame-variable-value): New function, default value for sldb-insert-frame-variable-value-function. (sldb-insert-locals): Use it here. * slime.el (slime-inspector-insert-ispec-function): New variable. (slime-open-inspector): Use it here. 2008-01-20 Matthias Koeppe * doc/slime.texi (Presentations): Improve documentation of presentations. 2008-01-19 Geo Carncross * swank-ecl.lisp (inspect-for-emacs): Make ECL inspection better; should be able to handle all builtin types and CLOS objects now. 2008-01-17 Nikodemus Siivola * swank-sbcl.lisp (sbcl-source-file-p): When a buffer is not associated with any file, M-. for names defined there ends up calling SBCL-SOURCE-FILE-P with NIL -- guard against that. 2008-01-14 Tobias C. Rittweiler * slime.el (sldb-mode): Add `sldb-quit' to `kill-buffer-hook' to close the debugging machinery on swank side when the SLDB buffer is killed. (Notice that killing the SLDB buffer manually will not restore window configuration in contrast to typing `q'.) 2008-01-10 Tobias C. Rittweiler * slime.el (slime-delete-and-extract-region): New function. Portable version of `delete-and-extract-region' which returned NIL instead of "", as experienced by Matthias Koeppe. 2008-01-09 Matthias Koeppe * slime.el (slime-repl-mode-map): Bind C-c C-t to slime-toggle-trace-fdefinition (as in Lisp buffers) instead of slime-repl-clear-buffer. This binding is useful for untracing functions directly from the trace output. Move slime-repl-clear-buffer to the keybinding C-c M-o. 2008-01-04 Juho Snellman * swank-sbcl.lisp (source-file-source-location): Use the debootstrap readtable when appropriate (fixes occasional reader errors when using "v" on debugger frames that point to functions defined in SBCL). Likewise for the debootstrapping packages. (code-location-debug-source-name): Ensure that we always return a physical namestring, Emacs won't like a pathname or a logical namestring. 2008-01-02 Luís Oliveira Use sane default values for slime-repl-set-package. Previously, when typing `,!p' at the REPL, the current package would have been inserted as a default (although the whole intent was to /change/ the current package in the first place), now nothing is inserted anymore. * slime.el (slime-pretty-current-package): rename it to slime-pretty-find-buffer-package and make it use slime-find-buffer-package instead of slime-current-package. (slime-repl-set-package, slime-set-package): use new function. 2008-01-02 Tobias C. Rittweiler * slime.el (slime-print-apropos): Simplified: Don't insert action properties anymore for the symbol; they were ignored anyway, because `apropos-follow' (bound to RET in the resulting *SLIME Apropos* buffer) looks for buttons only. 2008-01-02 Tobias C. Rittweiler * slime.el (slime-apropos): Update docstring: Apropos doesn't match on regular expressions anymore since 2007-11-24. 2007-12-22 Douglas Crosher * swank-scl.lisp (set-stream-timeout, make-socket-io-stream): update for Scieneer CL 1.3.7. 2007-12-21 Geo Carncross * swank-ecl.lisp: try to parse the Args: line in most ecl functions to make modeline/autodoc more interesting 2007-12-20 Tobias C. Rittweiler * swank.lisp (read-softly-from-string): Now actually returns all three values as explained in its docstring. 2007-12-14 Tobias C. Rittweiler * slime.el (slime-insert-xref-location): New function. Tries to either insert the file name a function is defined in, or inserts information about the buffer a function was interactively `C-c C-c'd from. Idea from Knut Olav Bøhmer. (slime-insert-xrefs): Use it. 2007-12-14 Geo Carncross * Add ECL threads implementation to swank 2007-12-04 Helmut Eller Simplify the inspector. * swank.lisp (inspect-object): Ignore the title value returned from backends. * slime.el (slime-open-inspector): Updated accordingly. 2007-12-04 Helmut Eller Fix slime-list-thread selector. * slime.el (slime-list-threads): Wait for the result before continuing. 2007-12-04 Helmut Eller * slime.el (slime-repl-insert-result): Use slime-repl-emit-result since handling of markers has changed. (slime-repl-emit-result): New argument: bol. 2007-12-02 Alan Caulkins Make it possible to close listening sockets. * swank.lisp (stop-server, restart-server): New functions. (*listener-sockets*): New variable. (setup-server): Store open sockets in *listener-sockets*. 2007-12-02 Helmut Eller Add hook to customize the region used by C-c C-c. Useful to recognize block declarations in CMUCL sources. * slime.el (slime-region-for-defun-function): New variable. (slime-region-for-defun-at-point): Use it. 2007-11-30 Helmut Eller Handle byte-functions without debug-info. * swank-cmucl.lisp (byte-function-location): Return an error if the component has no debug-info. 2007-11-30 Helmut Eller Disable the pretty-printer for backtraces. Would be nice if we could print newlines in strings as \n. * swank.lisp (*backtrace-printer-bindings*): New varaible. (backtrace, frame-locals-for-emacs): Use it. 2007-11-29 Tobias C. Rittweiler * swank.lisp (valid-function-name-p): Fixed wrt. setf functions. 2007-11-29 Helmut Eller Prettify package names for slime-repl-set-package. * slime.el (slime-repl-set-package): slime-current-package may have leading colons. Use slime-pretty-package-name to remove them. Reported by Constantine Vetoshev. (slime-pretty-current-package): New function. (slime-set-package): Use it. 2007-11-24 Helmut Eller Drop remaining dependencies on nregex. * swank-lispworks.lisp (unmangle-unfun): Use sys::setf-symbol-p instead of regexp matching. * swank-loader.lisp (*sysdep-files*): Don't include nregex. 2007-11-24 Helmut Eller Mirror *modules* in Emacs. * slime.el (slime-lisp-modules): New connction variable. (slime-set-connection-info): Load requested modules. (slime-required-modules): New variable. (slime-require, slime-load-contribs): New functions. * swank.lisp (connection-info): Include *modules*. (swank-require): Accept a list of modules as argument. 2007-11-24 Helmut Eller * swank.lisp (parse-package): The old version didn't pass the test-suite. Now use the reader directly instead of emulating it half-heartedly. * slime.el (slime-search-buffer-package): Don't remove double quotes or "#:", swank:parse-package takes care of that. 2007-11-24 Helmut Eller * swank.lisp (apropos-symbols): Use simple search instead of regexps. (make-apropos-matcher): Used to be make-regexp-matcher. (*sldb-printer-bindings*): Set *print-right-margin* to most-positive-fixnum. This prints each frame in the backtrace in a single long line. But is suboptimal for other purposes, like eval-in-frame. (setup-server): Initialize multiprocessing here, so that is also done for create-server. 2007-11-23 Tobias C. Rittweiler * swank.lisp (swank-require): Fix typo (:key was used instead of :test.) Reported by Stelian Ionescu. 2007-11-22 Helmut Eller * swank.lisp (swank-require): Don't search the file if the module-name is present in *modules*. That should avoid problems if swank is included in a core file and moved to a different location. Reported by John Wiegley. 2007-11-19 Tobias C. Rittweiler * slime.el (slime-repl-mode-map, slime-repl-read-mode), (slime-compiler-notes-mode-map, slime-xref-mode-map), (sldb-mode-map, slime-connection-list-mode-map), (slime-inspector-mode-map): Added bindings for [return] in addition to (kbd "RET"). The reason is that pressing enter in X is translated to (kbd "RET") only if no binding for [return] is active; if [return] is bound to something, pressing enter is translated to this key binding henceforth, as was explained to me by Pierre Gaston, thanks! This can cause quite confusing behaviour as Andreas Davour faced in his post to comp.lang.lisp. 2007-11-06 Helmut Eller * slime.el (slime-events-buffer, slime-inspector-buffer): Disable undo. 2007-11-01 Tobias C. Rittweiler The inspector page layout has changed slightly. Before the header looked like A proper list. [type: CONS] ------------------- It now looks like #: A proper list. -------------------- Rationale is to have a "presentation link" to the currently inspected object itself, to copy it down to the REPL via `M-RET'. This is mostly useful when trying to get a value from the Slime Debugger to the REPL, which you can do by inspecting the value first by `i', and then using `M-RET' on the object representation in the new header layout. Such a "presentation link" existed already but was removed in 2007-08-23. The old behaviour was to have the title ("A proper list" in the above example) to contain the link. I decided to make the link more explicit. * swank.lisp (inspect-object): Now additionally returns a string-representation of the object itself, and an inspector id for it. Removed returning its type as this is implicit in the new string representation. * slime.el (slime-open-inspector): Adapted for new header layout. 2007-10-22 Tobias C. Rittweiler * swank.lisp (read-softly-from-string, unintern-in-home-package): Moved from `contrib/swank-arglist.lisp'. (parse-package): Use them. (Removes FIXME about interning symbols.) Also changed the logic somewhat to avoid passing :|| to FIND-PACKAGE as ECL chokes on that. 2007-10-22 Steve Smith * swank-loader.lisp (compile-files-if-needed-serially): Added missing `load' argument to function definition on Corman Lisp / ECL. 2007-10-22 Mark Evenson * swank-abcl.lisp (getpid): Implemented. 2007-10-22 R. Matthew Emerson * swank-openmcl.lisp (closure-closed-over-values): Use CCL::NTH-IMMEDIATE instead of CCL::%SVREF. This makes it work on x86-64 OpenMCL. (The %SVREF worked on PPC, but this will work on both.) 2007-09-27 Tobias C. Rittweiler * slime.el (slime-filesystem-toplevel-directory): New function. Windows doesn't have a filesystem that is as hierarchical as the Unix' one. Reported by Carsten Blaauw and Stefan Kluehspies. (slime-file-name-merge-source-root): Use it. (slime-highlight-differences-in-dirname): Use it. 2007-09-26 Utz-Uwe Haus * swank-allegro.lisp (fspec-definition-locations): Allow the POSITION datum of :top-level-form fspecs to be missing. This apparently helpful for Allegro CL 8.1. 2007-09-21 Tobias C. Rittweiler * slime.el (slime-length=, slime-length>): Restore support for vectors, as `slime-length=' was already used with strings in `slime-parse.el'. This broke extended arglist display. 2007-09-20 Helmut Eller * slime.el (slime-setup): Call the respective init functions of contribs. * slime-autoloads.el (slime-setup-contribs): Ditto. 2007-09-19 Helmut Eller Simplify slime-compile-file. * slime.el (slime-compile-file): Don't save window config. (slime-curry, slime-rcurry): New functions. * slime.el (slime-complete-symbol*-fancy): Move defcustom to contrib/slime-c-p-c.el * swank-version.el: Delete file. No longer used. * bridge.el: Moved to contrib. * tree-widget.el: File deleted. Only needed by contribs and is distributed with Emacs 21. * slime.el: Reorder some devfars and menus code so that the compiler doesn't complain about free variables. Fix apropos in Emacs 22. * slime.el (slime-print-apropos): Add button props for Emacs 22. (slime-call-describer): ARG is a marker in Emacs 22. (def-slime-selector-method ?c): Wait until slime-list-threads returns. Remove define-slime-dialect. * slime.el (define-slime-dialect): Deleted. Use slime-lisp-implementations instead. Introduce a slime-start-and-init function. * slime.el (slime-start-and-init, slime-lisp-options): New functions. (slime-start-and-load): Use it. Simplify slime-length=. * slime.el (slime-length=, slime-length>): No need for vectors. Remove explicit support for Scheme mode. * slime.el (slime-scheme-mode-hook, slime-shared-lisp-mode-hook) Deleted. (slime-indentation-update-hooks): New hook. (slime-handle-indentation-update): Use it. Fix close-connection. * swank.lisp (close-connection): Use *log-output* instead of *debug-io* (which could be redirected to the to-be-closed connection). 2007-09-15 Helmut Eller Let slime-setup load contribs. * slime.el (slime-setup): Take a list of contribs to load as argument. * slime-autoloads.el (slime-setup): Ditto, but delay the actual loading until slime is loaded. (slime-setup-contribs): New function. 2007-09-15 Tobias C. Rittweiler * slime.el (slime-maybe-warn-for-different-source-root): Catch returned NIL from `slime-file-name-merge-source-root' if the two filenames don't share a common source root. Reported by Frank Goenninger. 2007-09-15 Tobias C. Rittweiler * slime.el (slime-split-string): New semi-portability function. The behaviour of `split-string' changed between Emacs21 and Emacs22. Thanks to Christophe Rhodes for reporting this. (slime-file-name-merge-source-root): Use `slime-split-string'. (slime-highlight-differences-in-dirname): Likewise. 2007-09-14 Helmut Eller Some cleanups for the REPL. * slime.el (slime-repl-write-string): Split it up into smaller functions. (slime-repl-emit, slime-repl-emit-result) (slime-emit-string): New functions. (slime-repl-save-history): Use prin1 instead of pp. (repl-type-ahead): New test case. 2007-09-12 Christophe Rhodes Make ASDF:LOAD-OP (and SBCL REQUIRE) happy with swank.asd * swank.asd: Define and use a CL-SCRIPT-FILE class for loading as source, even with ASDF:LOAD-OP. 2007-09-11 Tobias C. Rittweiler * swank-loader.lisp: Aways compile-file `contrib/swank-asdf.lisp' on SBCL. This fixes "Undefined function" style-warnings when using `slime-asdf' in combination with SBCL. Reported by Cyrus Harmon. * swank-sbcl.lisp: Explicitly require ASDF. (While this is not strictly necessary, as it's implicitly loaded on requiring the other modules, I think it's better to be explicit about it.) 2007-09-10 Helmut Eller Fix some bugs introduced while moving doc refs to contrib. * swank-sbcl.lisp (condition-references): It's still needed. * slime.el (sldb-dispatch-extras): Add missing quote. (slime-sbcl-manual-root): Move definition to contrib/slime-references.el. (slime-cl-symbol-name, slime-cl-symbol-package): Move to contrib/slime-parse.el. 2007-09-10 Helmut Eller Move SBCL doc references to contrib. * slime.el (sldb-insert-condition): Merge REFERENCES and EXTRAS. (sldb-extras-hooks, sldb-dispatch-extras): New hook. * swank-backend.lisp (condition-references): Removed. Merged with condition-extras. * swank-sbcl.lisp (condition-references): Removed. (condition-extras): Include references. (externalize-reference): New function. Don't return plain symbols. * swank-allegro.lisp (condition-references): Removed. 2007-09-10 Tobias C. Rittweiler * slime.el (slime-cl-symbol-name, slime-cl-symbol-package): Ressurected, as they're still used in this file. Reported by Edward Cant. 2007-09-10 Tobias C. Rittweiler When working on multiple source trees simultaneously, the way `slime-edit-definition' (M-.) works can sometimes be confusing: `M-.' visits locations that are present in the current Lisp image, which works perfectly well as long as the image reflects the source tree that one is currently looking at. In the other case, however, one can easily end up visiting a file in a different source root directory (the one corresponding to the Lisp image), and is thus easily tricked to modify the wrong source files---which can lead to quite some stressfull cursing. If the variable `slime-warn-when-possibly-tricked-by-M-.' is T (the default), a warning message is issued to raise the user's attention whenever `M-.' is about opening a file in a different source root that also exists in the source root directory of the user's _current buffer_. There's no guarantee that all possible cases are covered, but if you encounter such a warning, it's a strong indication that you should check twice before modifying. * slime.el (slime-file-name-merge-source-root): New function. (slime-highlight-differences-in-dirname): New function. (slime-maybe-warn-for-different-source-root): New function. (slime-warn-when-possibly-tricked-by-M-.): New variable (T by default.) (slime-goto-location-buffer): Where appropriate, call `slime-maybe-warn-for-different-source-root' 2007-09-08 Stelian Ionescu * slime.el (save-restriction-if-possible): Place macro definition above use of the macro, to regain ability to byte-compile-file. 2007-09-08 Tobias C. Rittweiler Fix message displaying on XEmacs. Reported by Steven E. Harris, and Ken Causey. * slime.el (slime-display-message): Resurrect secondary `buffer-name' argument which got lost in 2007-08-24. (slime-format-display-message): Resurrect passing "*SLIME Note*" as default buffer-name to `slime-display-message'. 2007-09-08 Matt Pillsbury * swank-backend.lisp (definterface): Updated docstring. 2007-09-06 Matthias Koeppe * slime.el (slime-repl-write-string): Use case, not ecase, for dispatching targets.Should fix XEmacs compatibility. Reported by Steven E. Harris. 2007-09-05 Didier Verna * slime.el (slime-filename-translations): Fix custom type. 2007-09-05 Helmut Eller * slime.el (slime-toggle-trace-fdefinition): Fix typo. The argument for interactive should be "P" not "p". 2007-09-04 Mark Evenson * swank-abcl.lisp: Call accessors of compiler-condition at load time to work around some ABCL problems. 2007-09-04 Helmut Eller Move asdf support to contrib. * swank-backend.lisp (operate-on-system): Moved to swank-asdf.lisp. It wasn't specialized in any backend. * swank.lisp (operate-on-system-for-emacs) (list-all-systems-known-to-asdf, list-asdf-systems): Moved to swank-asdf.lisp. * slime.el: Move asdf commands to contrib slime-adsf.el. * swank-loader.lisp: Load swank-asdf if ASDF is in *FEATURES*. Also add the contrib source directory to swank::*load-path*. 2007-09-04 Helmut Eller * slime.el: Move tramp support to contrib. 2007-09-04 Helmut Eller Move startup animation to contrib. * slime.el (slime-repl-banner-function): New hook. (slime-repl-update-banner): Use it and reset markers after calling it. (slime-set-default-directory): Don't call slime-repl-update-banner here. (slime-repl-insert-prompt): Set slime-repl-input-end-mark to point-max. 2007-09-04 Helmut Eller * slime.el: Move inferior-slime-mode to contrib. 2007-09-04 Helmut Eller * slime.el: Fix the test suite (except for SBCL). 2007-09-04 Helmut Eller Simplify slime-process-available-input. * slime.el (slime-process-available-input): We are called in a process filter, i.e. at arbitrary times and in an aribtrary buffer. So it doesn't make sense to save-and-restore the current buffer here (slime-eval-async): Instead, save and restore the buffer here. (slime-net-read-or-lose): New. 2007-09-04 Helmut Eller Remove request-abort condition. * swank-backend.lisp (request-abort): Removed (abort-request): Removed. Replace all (3) uses with ERROR. * swank.lisp (eval-for-emacs): No special case for request-abort. * slime.el (slime-eval-async): Remove optional arg of :abort. 2007-09-04 Helmut Eller Rename slime-insert-possibly-as-rectangle to slime-insert-indented. * slime.el (slime-insert-indented): Renamed. Update callers. 2007-08-31 Helmut Eller Move compound prefix completion and autodoc to contrib. * swank.lisp (simple-completions): Rewritten for simplicity. (operator-arglist): Rewritten for simplicity. * slime.el (slime-complete-symbol-function): Make simple completion the default. (slime-echo-arglist-function, slime-echo-arglist): New hook. Remove corresponding key bindigs. * slime.el (slime-obsolete-commands): New table. Use it to bind a command with an upgrade notice. 2007-08-31 Andreas Fuchs * slime.el (slime-reindent-defun): Fixed when used in lisp file buffers. (Similiar patch also provided by Gábor Melis; problem also reported by Jeff Cunningham.) 2007-08-31 Jon Allen Boone * swank-cmucl.lisp: CMUCL now has an x86-Darwin port as well as the PPC-Darwin version. Changed to conditionalize on the presence of darwin instead of ppc so that slime works with both Darwin versions of CMUCL. 2007-08-31 Tobias C. Rittweiler * slime.el (slime-sexp-at-point): Explicitely set current syntax table to operate in `lisp-mode-syntax-table' because `thing-at-point' is used which depends on the syntax table. (E.g. keywords like `:foo' aren't recognized as sexp otherwise.) * slime.el (slime-parse-extended-operator/declare): Wrap regexp stuff in `save-match-data' (slime-internal-scratch-buffer): Removed again. Was only introduced as a performance hack; but it turned out that the bad performance was because of unneccessary recursive calls of `slime-make-form-spec-from-string'. (Which was fixed on 2007-08-27 already.) (slime-make-form-spec-from-string): Use `with-temp-buffer' instead of `slime-internal-scratch-buffer'. Removed activation of `lisp-mode' in the temporary buffer, because this made `lisp-mode-hooks' run. This activated autodoc in the temp buffer, although the temp buffer is used to compute an autodoc itself (which resulted in some very mutual recursion which caused the current arglist to be displayed again and again---as could have been witnessed in `*Messages*'.) `Lisp-mode' was activated to get the right syntax-table for `slime-sexp-at-point', but this one sets the correct syntax-table itself now. 2007-08-28 Matthias Koeppe Fix user input type-ahead again (this change from 2007-08-25 got lost). Testcase: Type (dotimes (i 5) (format t "Number ~A~%" i) (sleep 1)) and then type ahead while the command is executing and output arrives. * slime.el (slime-repl-insert-prompt): Don't go to point-max but to slime-repl-input-start-mark if there is one. (slime-repl-write-string): Insert a :repl-result before the prompt, not at point-max. Update markers properly. 2007-08-28 Helmut Eller * swank-cmucl.lisp (safe-definition-finding): Remove whitespace around error messages. (trim-whitespace): New function. 2007-08-28 Helmut Eller Fix some output related bugs. * swank.lisp (send-repl-results-to-emacs): Emit a fresh line. * slime.el (slime-insert-transcript-delimiter): Use insert-before-markers since slime-output-end is no longer left inserting. Reported by Austin Haas . 2007-08-28 Helmut Eller * slime.el (slime-display-or-scroll-completions, slime-scroll-completions): New functions. Factored out of slime-expand-abbreviations-and-complete. 2007-08-28 Matthias Koeppe * slime.el (slime-repl-write-string): Handle arbitrary targets using slime-output-target-marker. (slime-last-output-target-id, slime-output-target-to-marker) (slime-output-target-marker) (slime-redirect-trace-output): Move back here from slime-presentations.el. 2007-08-28 Tobias C. Rittweiler * swank.lisp (classify-symbol, symbol-classification->string): Resurrected in swank.lisp. (I was bitten by cvs-pcl which committed (2007-08-27) my locally changed `contribs/swank-fuzzy.lisp' where I already removed these functions from.) 2007-08-28 Tobias C. Rittweiler * slime.el (slime-make-form-spec-from-string): Elisp Hacking 101: Don't use `beginning-of-buffer' and `end-of-buffer' in Elisp code. * swank.lisp (read-form-spec): Unintern just newly interned symbols when an reader error occurs. 2007-08-28 Helmut Eller Move presentations to contrib. Part II. * swank.lisp (*listener-eval-function*): New variables. (listener-eval): Use it (repl-eval): Used to be listener-eval. (*send-repl-results-function*): New variable. (eval-region): Simplify. (track-package, cat): New functions. (slime-repl-clear-buffer-hook): New hook. (slime-repl-clear-buffer): Use it. 2007-08-28 Matthias Koeppe Remove the ID argument from :write-string protocol messages. Everything, except for rigid-indentation tricks, can be achieved by using :write-string in conjunction with :presentation-start and :presentation-end. * swank.lisp (present-in-emacs): Unused, removed. * swank.lisp (make-output-function-for-target): Remove id argument from :write-string. (send-repl-results-to-emacs): Don't call save-presented-object. Remove id argument from :write-string. * slime.el (slime-dispatch-event): Change it here. (slime-write-string, slime-repl-write-string): And here. 2007-08-28 Matthias Koeppe * swank-loader.lisp (*contribs*): Add swank-presentations. 2007-08-27 Tobias C. Rittweiler * slime.el (slime-make-extended-operator-parser/look-ahead): Move to end of symbol at point. (slime-make-form-spec-from-string): Fixes unexpected behaviour of `save-excursion'. 2007-08-27 Tobias C. Rittweiler * slime.el (slime-sexp-at-point): Fixes a few edge cases were Emacs' `(thing-at-point 'sexp)' behaves suboptimally. For example, `foo(bar baz)' where point is at the ?\(. (slime-internal-scratch-buffer): New. This variable holds an internal scratch buffer that can be reused instead of having to create a new temporary buffer again and again. (slime-make-extended-operator-parser/look-ahead): Uses `slime-make-form-spec-from-string' to parse nested expressions properly. (slime-nesting-until-point): Added docstring. (slime-make-form-spec-from-string): Added new optional parameter for stripping the operator off the passed string representation of a form. Necessary to work in the context of `slime-make-extended-operator-parser/look-ahead'. Added safety check against a possible endless recursion. * swank.lisp (parse-form-spec): Looses restriction for nesting. 2007-08-27 Helmut Eller * slime.el (slime-eval-feature-conditional): Fix typo. (slime-keywordify): Simplify. 2007-08-27 Helmut Eller Move presentations to contrib. Part I. * slime.el (slime-event-hooks, slime-dispatch-event): New hook. (slime-write-string-function, slime-write-string): New hook. (slime-repl-return-hooks, slime-repl-return): New hook. (slime-repl-current-input-hooks, slime-repl-current-input): New hook. (slime-open-stream-hooks, slime-open-stream-to-lisp): New hook. (sldb-insert-locals, slime-inspector-insert-ispec) (slime-last-expression): Don't use presentations. 2007-08-26 Tobias C. Rittweiler Reduces needless interning of symbols that was introduced by my recent work on autodoc to a minimum. Also fixes this issue for `slime-complete-form' which always interned symbols even before my changes. * slime.el (slime-sexp-at-point): If N is given, but there aren't N sexps available at point, make it return a list of just as many as there are. (slime-make-form-spec-from-string): New. Creates a ``raw form spec'' from a string that's suited for determining newly interned symbols later in Swank. (slime-parse-extended-operator/declare): Uses it. * swank.lisp (parse-symbol): Returns internal knowledge, to provide a means for callers to perform a sanity check. (call-with-ignored-reader-errors): New. Abstracted out from `read-incomplete-form-from-string.' * swank.lisp (read-form-spec): New. Only READs elements of a form spec if necessary. And if it does have to READ, it keeps track of newly interned symbols which are returned as secondary return value. (parse-form-spec): Use it. Propagate newly interned symbols. (parse-first-valid-form-spec): Likewise. (arglist-for-echo-area, complete-form, completions-for-keyword): Adapted to unintern the newly interned symbols. 2007-08-26 Tobias C. Rittweiler * slime.el (current-slime-narrowing-configuration): Renamed to `slime-current-narrowing-configuration'. (set-slime-narrowing-configuration): Renamed to `slime-set-narrowing-configuration'. (current-slime-emacs-snapshot): Renamed to `slime-current-emacs-snapshot'. (current-slime-emacs-snapshot-fingerprint): Renamed to `slime-current-emacs-snapshot-fingerprint'. (set-slime-emacs-snapshot): Renamed to `slime-set-emacs-snapshot'. 2007-08-26 Tobias C. Rittweiler * slime.el (save-restriction-if-possible): Fixed another typo, duh! Thanks again to Matthias Koeppe. 2007-08-26 Tobias C. Rittweiler * slime.el (slime-cl-symbol-name): Handle vertical bars (|) (%slime-nesting-until-point): Renamed to `slime-nesting-until-point'. 2007-08-25 Matthias Koeppe Fix a bug where REPL results would sometimes be indented by a random amount. * slime.el (slime-insert-presentation): Make the rectangle-ification of multi-line presentations, introduced 2006-12-19, optional. (slime-write-string): Use it here only for regular output, but not for REPL results. (sldb-insert-locals): Use it here. (slime-inspector-insert-ispec): Use it here. 2007-08-25 Matthias Koeppe Fix handling of user-input type-ahead in the REPL. Reported by Madhu on 2007-04-24. * slime.el (slime-write-string): Make sure text properties are rear-nonsticky, so typed-ahead user input does not pick up the text properties. Fix up some markers. (slime-reset-repl-markers): Make the marker slime-output-end of insertion type nil (no automatic advances on insertions). (slime-with-output-end-mark): Update the location of slime-output-end here manually. (slime-repl-update-banner): Use insert-before-markers. 2007-08-25 Matthias Koeppe New command slime-redirect-trace-output creates a separate Emacs buffer, where all subsequent trace output is sent. * slime.el (slime-last-output-target-id): New variable. (slime-output-target-to-marker): New variable. (slime-output-target-marker): New function. (slime-write-string): Handle general "target" arguments using slime-output-target-marker. (slime-redirect-trace-output): New command. (slime-easy-menu): Add a menu item for it. * slime.el (slime-mark-presentation-start) (slime-mark-presentation-end): Make "target" argument optional. Use slime-output-target-to-marker. * swank.lisp (make-output-stream-for-target): New function, factored out from open-streams. (open-streams): Use it here. * swank.lisp (connection): New slot "trace-output". (call-with-redirected-io): Use it here. (redirect-trace-output): New slimefun; set the slot to a new target stream. 2007-08-25 Tobias C. Rittweiler * slime.el (save-restriction-if-possible): Fixed typo in macroexpansion. Thanks to Matthias Koeppe for reporting. 2007-08-24 Matthias Koeppe * slime.el (slime-insert-arglist): Removed, superseded by slime-complete-form since 2005-02-20. * swank.lisp (arglist-for-insertion): Now unused, removed. 2007-08-24 Matthias Koeppe Some fixes to the presentation-streams contrib. * slime.el (slime-dispatch-event): Handle new optionals args of messages :presentation-start and :presentation-end. * slime.el (slime-mark-presentation-start) (slime-mark-presentation-end): New arg "target"; record presentation boundaries separately for REPL results and regular process output. This fixes the presentation markup of REPL results when the presentation-streams contrib is loaded. 2007-08-24 Matthias Koeppe Make the fancy presentation-streams feature a contrib. Previously, it was only available if "present.lisp" was loaded manually. Now it can be loaded automatically using: (add-hook 'slime-load-hook (lambda () (require 'slime-presentation-streams))) Note that the normal presentations that are created by REPL results, the inspector, and the debugger are NOT dependent on this code. * present.lisp: Moved to contrib/swank-presentation-streams.lisp. * swank-loader.lisp (*contribs*): Add swank-presentation-streams. 2007-08-24 Helmut Eller Move typeout frame to contrib. * slime.el (slime-message-function, slime-background-message-function) (slime-autodoc-message-function): New variables. (slime-message, slime-background-message) (slime-autodoc-message): Call the function in the respective variable, so that the typeout window can be plugged in. 2007-08-24 Helmut Eller Move xref and class browser to contrib. * slime.el (slime-browse-classes, slime-browse-xrefs): Gone. The Common Lisp part is still there. 2007-08-24 Tobias C. Rittweiler * slime.el (slime-forward-blanks): Wrapped w/ `ignore-errors.' (slime-sexp-at-point): Return results as a list of strings, rather than just one big string if called with arg > 1. (slime-parse-extended-operator-name): Wrapping some movement code in `ignore-errors'. Adapted to new return value of `slime-enclosing-form-specs'. Minor cosmetic changes. (slime-make-extended-operator-parser/look-ahead): Adapted to changes of the ``raw form spec'' format; returns a form of strings, instead of a string of a form. (slime-parse-extended-operator/declare): Simplified. Adapted to changes of the ``raw form spec'' format; passes decl-identifiers, or typespec-operators respectively, along the decl/type-spec. (%slime-in-mid-of-typespec-p): Removed. Replaced by an regexp based approach. (%slime-nesting-until-point): New helper for `slime-parse-extended-operator/declare'. * swank.lisp (parse-form-spec): Adapted to new ``raw form spec'' format. Updated format description in docstring accordingly. The new format allows less interning of wrong symbols names comming from Slime. Thanks to Matthias Koeppe for spotting this. 2007-08-24 Helmut Eller Move slime-highlight-edits-mode to contrib. 2007-08-24 Helmut Eller Move slime-scratch to contrib. * slime.el (slime-scratch): Gone. 2007-08-24 Helmut Eller Various cleanups related to slime-insert-propertized. * slime.el (slime-with-rigid-indentation): Fix evaluation order. (slime-indent-rigidly): New. (slime-insert-possibly-as-rectange): Don't set mark. (slime-insert-propertized): Use plain insert instead of slime-insert-possibly-as-rectange. 2007-08-24 Helmut Eller * swank-sbcl.lisp (sbcl-inspector): Fix typo. 2007-08-23 Matthias Koeppe Repair inspection of presentations. * swank.lisp (inspect-presentation): New slimefun. * slime.el (slime-inspect-presentation-at-mouse): Use it here. 2007-08-23 Helmut Eller Move Marco Baringer's inspector to contrib. * swank.lisp (*default-inspector*): New variable. Set this variable dispatch to different inspectors. (inspect-object): Use it. * swank-loader.lisp (*contribs*): Add 'swank-fancy-inspector. * swank-backend.lisp (backend-inspector): New class. Introduce a named class to give as another way to dispatch to backend methods. * swank-cmucl.lisp: Use backend-inspector class. * swank-sbcl.lisp: Use backend-inspector class. * swank-clisp.lisp: Use backend-inspector class. * swank-lispworks.lisp: Use backend-inspector class. * swank-allegro.lisp: Use backend-inspector class. * swank-openmcl.lisp: Use backend-inspector class. * swank-abcl.lisp: Use backend-inspector class. * swank-corman.lisp: Use backend-inspector class. * swank-scl.lisp: Use backend-inspector class. 2007-08-23 Tobias C. Rittweiler Added arglist display for declaration specifiers and type specifiers. Examples: `(declare (type' will display (declare (type type-specifier &rest vars)) `(declare (type (float' will display [Typespec] (float &optional lower-limit upper-limit) `(declare (optimize' will display (declare (optimize &any (safety 1) (space 1) (speed 1) ...)) &ANY is a new lambda keyword that is introduced for arglist description purpose, and is very similiar to &KEY, but isn't based upon plists; they're more based upon *FEATURES* lists. (See the comment near the ARGLIST defstruct in `swank.lisp'.) * slime.el: (slime-to-feature-keyword): Renamed to `slime-keywordify'. (slime-eval-feature-conditional): Adapted to use `slime-keywordify'. (slime-ensure-list): New utility. (slime-sexp-at-point): Now takes an argument that specify how many sexps at point should be returned. (slime-enclosing-operator-names): Renamed to `slime-enclosing-form-specs'. (slime-enclosing-form-specs): Returns a list of ``raw form specs'' instead of what was called ``extended operator names'' before, see `swank::parse-form-spec' for more information. This is a simplified superset. Additionally as tertiary return value return a list of points to let the caller see where each form spec is located. Adapted callers accordingly. Extended docstring. (slime-parse-extended-operator-name): Adapted to changes in `slime-enclosing-form-specs'. Now gets more context, and is such more powerful. This was needed to allow parsing DECLARE forms. (slime-make-extended-operator-parser/look-ahead): Because the protocol for arglist display was simplified, it was possible to replace the plethora of parsing function just by this one. (slime-extended-operator-name-parser-alist): Use it. Also add parser for DECLARE forms. (slime-parse-extended-operator/declare): Responsible for parsing DECLARE forms. (%slime-in-mid-of-typespec-p): Helper function for `slime-parse-extended-operator/declare'. (slime-incomplete-form-at-point): New. Return the ``raw form spec'' near point. (slime-complete-form): Use `slime-incomplete-form-at-point'. * swank.lisp: New Helper functions. (length=, ensure-list, recursively-empty-p): New. (maybecall, exactly-one-p): New. * swank.lisp (arglist-for-echo-area): Adapted to take ``raw form specs'' from Slime. (parse-form-spec): New. Takes a ``raw form spec'' and returns a ``form spec'' for further processing in Swank. Docstring documents these two terms. (split-form-spec): New. Return relevant information from a form spec. (parse-first-valid-form-spec): Replaces `find-valid-operator-name'. (find-valid-operator-name): Removed. (operator-designator-to-form): Removed. Obsoleted by `parse-form-spec'. (defstruct arglist): Add `any-p' and `any-args' slots to contain arguments belonging to the &ANY lambda keyword. (print-arglist): Adapted to also print &ANY args. (print-decoded-arglist-as-template): Likewise. (decode-arglist): Adapted to also decode &ANY args. (remove-actual-args): Adapted to also remove &ANY args. (remove-&key-args): Split out from `remove-actual-args'. (remove-&any-args): New. Removes already provided &ANY args. (arglist-from-form-spec): New. Added detailed docstring. (arglist-dispatch): Dispatching generic function for `arglist-from-form-spec' that does all the work. Renamed from prior `form-completion'. (arglist-dispatch) Added methods for dealing with declaration and type-specifiers. (complete-form): Adapted to take ``raw form specs'' from Slime. (completions-for-keyword): Likewise. (format-arglist-for-echo-area): Removed. Not needed anymore. * swank-backend.lisp (declaration-arglist): New generic function. Returns the arglist for a given declaration identifier. (Backends are supposed to specialize it if they can provide additional information.) (type-specifier-arglist): New generic function. Returns the arglist for a given type-specifier operator. (Backends are supposed to specialize it if they can provide additional information.) (*type-specifier-arglists*): New variable. Contains the arglists for the type specifiers in Common Lisp. * swank-sbcl.lisp: Now depends upon sb-cltl2. (declaration-arglist 'optimize): Specialize the `optimize' declaration identifier to pass it to sb-cltl2:declaration-information. 2007-08-23 Helmut Eller Some inspector cleanups. * slime.el (slime-inspect): Remove dwim stuff and drop keyword args. (slime-read-object): Killed. (slime-open-inspector): Drop keyword args. Update callers accodordingly, expect presentation related code. Presentations no longer work in the inspector. * swank.lisp (*inspector-dwim-lookup-hooks*) (default-dwim-inspector-lookup-hook): Deleted. (init-inspector): Sanitize arglist. (inspect-object): Don't return an :id for *inspectee-parts*. * swank-backend (type-for-emacs): Removed. No backend implemented it. 2007-08-23 Helmut Eller * slime.el (slime-fuzzy-upgrade-notice): New function. Bound to the key where slime-fuzzy-complete-symbol used to be. 2007-08-22 Tobias C. Rittweiler * slime.el (slime-close-all-parens-in-sexp): Fix interplay with `slime-close-parens-limit'. This should also affect `slime-complete-form' (C-c C-s) in a positive way. 2007-08-19 Helmut Eller * contrib: New directory. Move fuzzy completion code to that directory. * swank.lisp (swank-require): New function to load contrib code. (*find-module*, module-filename, *load-path*, merged-directory) (find-module, module-canditates): New. Pathname acroba