[initial revision Taylor Campbell **20050918004210] [Added circular writing (CL-style #n=... & #n#). Taylor Campbell **20050918005251 Implemented a simple CIRCULAR-WRITE (naively written using alists for the circular object tables) and improved the safety of several parts by using that instead of the standard writer or the pretty-printer, which are now used only where safe or necessary. ] [Changed '-*- mode: scheme48; package: ... -*-' lines to '-*- mode: scheme; scheme48-package: ... -*-' in all Scheme source files. Taylor Campbell **20050918165405 Not everyone has scheme48.el, and a buffer-local `package' variable is a bad idea, because it is frequently meant to be a function-local variable in elisp, but WITH-CURRENT-BUFFER would pre-empt that. ] [Fixed the SLIME48 starter so that the README's explanation of how to close the server is accurate. Taylor Campbell **20050918165828] [Added a log message when closing Swank TCP servers. Taylor Campbell **20050918165911] [Introduced SWANK-TCP-SERVER-PORT-NUMBER. Taylor Campbell **20050921033132] [Modified SLIME48-START in load.scm & SLIME48 in top.scm to accept an option for specifying either a port or a file to write the OS-selected port to. Taylor Campbell **20050921033206 SLIME48-START & SLIME48 now have an optional argument, which may be either a number or a string: if it is a number, the Swank TCP server listens on that service; if it is a string, the selection of the port number is left to the OS, and then a file is created whose contents are that port number, for the remote system to poll to find the port by which to connect to the Scheme48 Swank server. ] [Renamed defrectype*.scm to defrectype.scm. Taylor Campbell **20051002001616] [Brought REPL & inspector up to date and implemented REPL presentations. Taylor Campbell **20051003040138] [Made circular writer ignore nil. Taylor Campbell **20051003040542] [Renamed :READ-OUTPUT -> :WRITE-STRING in Scheme-to-Emacs output interface. Taylor Campbell **20051003040600] [Removed uses of POSIX pids, which don't work on Windows and which are unnecessary for multithreaded Swank servers, only SIGIO ones. Taylor Campbell **20051003040724] [Fixed backwards REPL presentation switch toggling. Taylor Campbell **20051003041508] [Expounded on hackishness of the #. reader macro needed to implement presentations. Taylor Campbell **20051003041953] [Added slime48.el, a collection of utilities augmenting slime.el on the Emacs side of SLIME48. Taylor Campbell **20051003050915] [Introduced USE-PACKAGE Swank RPC and ,USE(-PACKAGE) SLIME REPL command. Taylor Campbell **20051003055921] [Removed half-assed definitions of PACKAGE-OPEN! & PACKAGE-UNDEFINE! from module.scm and replaced them with the built-in PACKAGE-MUTATION structure's exports. Taylor Campbell **20051003055950 Package mutation is now more likely to work, though I haven't tried it yet. I previously avoided PACKAGE-MUTATION because I was also using my own hacks for undefined global errors (to install restarts) and because I thought it probably relied on the presence of the rest of the built-in command processor's bulk, which is not the case. ] [Fixed the one remaining -*- line, of module.scm, that specified scheme48-mode and a 'package' local variable. Taylor Campbell **20051003071440] [Implemented simple name completion. Taylor Campbell **20051003192828] [Implemented apropos support. Taylor Campbell **20051003193137] [Corrected boolean argument interpretation in SWANK:APROPOS-LIST-FOR-EMACS RPC. Taylor Campbell **20051003195115] [Finished listing of Swank RPC interfaces in interfaces.scm and corrected some entries. Taylor Campbell **20051004021442] [Fixed typo: 'elsewherea' -> 'elsewhere' in comment about internal facility interfaces in interfaces.scm. Taylor Campbell **20051004021514] [Implemented UID->PACKAGE in MODULE-CONTROL. Taylor Campbell **20051004064209] [Changed evaluation in SLDB frames to use UID->PACKAGE to compute the package to evaluate in reliably, rather than guessing heuristically from the package name in the frame's debug data record. Taylor Campbell **20051004064417] [Upcased quoted literal symbols in apropos output to match the convention of the rest of the code. Taylor Campbell **20051004065939] [Implemented fancy inspection of byte vectors. Taylor Campbell **20051004153353] [Simplified and tightened a number of packages' OPEN clauses in packages.scm. Replaced two erroneously introduced references to SIGNALS with SIMPLE-SIGNALS. Taylor Campbell **20051004164346] [Reflected changes to REPL-EVAL-STRING's interface in inspector and SLDB evaluation-in-frame commands. Taylor Campbell **20051004165850] [Introduced LIMITED-WRITING structure for a more general limited writing facility to replace that of DISPLAY-CONDITIONS. Taylor Campbell **20051004180829 The LIMITED-WRITING structure provides centralized fluids for the current depth & length for limited writing and removes the need for passing explicit arguments and maintaining this information manually, so all of the randomness like REPL-PRINT-DEPTH, SLDB-PRINT-LENGTH, &c., has been expunged. LIMITED-WRITE-TO-STRING from STRING-I/O now also respects the current write depth & length. ] [Massively reworked SLDB basis and abstracted much functionality into a separate module. Taylor Campbell **20051010214926] [Updated for the new connection info & multiple Lisp support in SLIME. Taylor Campbell **20051101204345 `slime48.el' is now usable, because an erroneous reference to my own local function LOAD-SLIME was replaced, and useful to others, because it provides utilities for starting up SLIME48 on its own. Also, the hack of setting the default values of SLIME-LISP-PACKAGE:CONNLOCAL & SLIME-LISP-PACKAGE-PROMPT-STRING:CONNLOCAL is no longer needed, due to SLIME's new general support for multiple Lisps. ] [Implemented generalization of SWANK:QUIT-LISP, so that SLIME48 started from Emacs can exit the Scheme48 image on ,QUIT and SLIME48 started manually in a pre-existing Scheme48 image can specify how SLIME48's quit should be handled, which by default only terminates the Swank session. Taylor Campbell **20051101214549] [Fixed SWANK:SLDB-ABORT, which was previously operating on a bogus assumption that there should always be an ABORT restarter even after skipping the one set up by Swank. Taylor Campbell **20051102224735] [Fixed implementation of USE-PACKAGE so that it would actually load the package first. Taylor Campbell **20051103033502] [Implemented SWANK:UNDEFINE-FUNCTION (which can undefine anything, of course, not just functions, because Scheme does not separate namespaces). Taylor Campbell **20051103043943] [Fixed redefinition by tossing in the package mutation sentinel at every RPC evaluation. Redefining a binding in one package should now update all references to it in compiled code of other packages. Taylor Campbell **20051103044041] [Implemented the Swank compilation & loading RPCs. Taylor Campbell **20051103044127] [Fixed circular writing of dotted lists to include the dotted cdr. Taylor Campbell **20051107221650] [Clarified error message for unbound variables in MAYBE-BINDING-VALUE in module.scm. Taylor Campbell **20051108065538] [Fixed completion so that generated names defined in a package would not cause errors when trying to complete. Taylor Campbell **20051218160634] [Changed SWANK:LIST-ALL-PACKAGE-NAMES to list all the structures in the Swank world, not all the packages. Taylor Campbell **20051218160912 (See the comment inserted above the change for details.) ] [Implemented procedure definition finding. Taylor Campbell **20051218161625] [Fixed source disclosure hack for CALL-WITH-VALUES so that it will not barf if the first operand is not a LAMBDA expression. Taylor Campbell **20051218161809] [Added scheme-mode & scheme48-mode to the recognized SLIME Lisp modes in slime48.el. Taylor Campbell **20051218162016] [Fixed SWANK:SET-PACKAGE to load the package if it is not already loaded before setting the interaction environment to it. Taylor Campbell **20051218163318] [Implemented SWANK:PPRINT-INSPECTOR-PART. Taylor Campbell **20051218165348] [Added SWANK:COMPILER-MACROEXPAND & SWANK:COMPILER-MACROEXPAND-1 to macro expansion RPC interface. Taylor Campbell **20051218165529] [Removed ,IN & ,IN-PACKAGE REPL shortcut, since it was added to SLIME CVS. Taylor Campbell **20051218170547] [Renamed CL:BREAK -> SWANK:SIMPLE-BREAK, since the change was made in SLIME CVS. Taylor Campbell **20051218170639] [Overhauled README to reflect integration with SLIME's new Lisp implementation selection system, rather than the old, manual SLIME48 startup routine. Taylor Campbell **20051218191202] [Turned on Scheme48's LOAD-NOISILY switch in `slime48-init-command'. Taylor Campbell **20051218191227] [Removed unnecessary `slime-lisp-implementations' cruft in slime48.el, now that it has been moved into the suggested initialization code in the README. Taylor Campbell **20051218192501] [Clarified note about slowness and warnings in loading SLIME48. Taylor Campbell **20060116203215] [Reorganized and simplified code to inspect vectors and templates, and added disassembly to template inspection. Taylor Campbell **20060116203650] [Fixed LOAD-FILE hack for appending .scm extension so that it works even if the .scm extension is already there, rather than causing LOAD to lose due to receiving a bogus filename argument. Taylor Campbell **20060116204056] [Modified slime48.el to provide the `slime48' feature after loading. Taylor Campbell **20060116204238] [Implemented disassembly of debugger frames. Taylor Campbell **20060116205645] [Implemented inspection of closures. Taylor Campbell **20060116211305] [Fixed bug in backtrace generation, tickled by slime.el's `sldb-fetch-all-frames'. Taylor Campbell **20060224184807] [Robustified frame variable inspection and source location in SLDB. Taylor Campbell **20060224185027] [Fixed typo in SWANK:SLDB-DISASSEMBLE -- ABORT-SWANK-RPC, not SWANK-ABORT-RPC. Taylor Campbell **20060224185854] [Converted Swank interrupts & breaks to use BREAKPOINT conditions, not conditions with some special SWANK-USER-INTERRUPT condition type. Taylor Campbell **20060224185933] [Added the printed representation of inspectee to inspector titles. Taylor Campbell **20060224194246] [Added optional arguments to ABORT-SWANK-RPC for log messages. Taylor Campbell **20060225214415 This is non-optimal, but it will do until I have the inclination to try to push more informative messages in :ABORT RPC answers to official SLIME. ] [Included machine instance in connection info. Taylor Campbell **20060315055135 A recent change to slime.el in the SLIME CVS repository made this information necessary. The change improves support for running Lisp instances on remote machines, and although SLIME48 doesn't currently support that it still needs the machine instance name to identify machines. ] [Implemented inspection of records. Taylor Campbell **20060315055943] [Changed `slime48-init-command' in slime48.el to use %S instead of %s when generating the =slime48/ filename translation. Taylor Campbell **20060318003743 This is necessary for filenames that may contain spaces and backslashes, for instance on Windows. ] [Disabled arglist-on-space feature in elisp initialization code suggested by the README. Taylor Campbell **20060331020742] [Changed SOURCE-LOCATION-HINTS to use LIMITED-WRITE-TO-STRING instead of SYMBOL->STRING for the call site, since calls' operators are not limited to symbols. Taylor Campbell **20060404203318] [Factored debug data name displaying into a separate procedure, in preparation for its use in a statistical profiler. Taylor Campbell **20060404203635] [Rewrote source location code. Taylor Campbell **20060404203655 In addition to simplifying and clarifying this code, this now filters out packages from the beginning if their filenames are empty strings, which is the case for statically linked packages. ] [Extended FIND-RESTARTER with an optional restarter list parameter, defaulting to the current restarters. Taylor Campbell **20060418155836] [Fixed and simplified SLDB restarting commands (ABORT, CONTINUE, THROW-TO-TOPLEVEL). Taylor Campbell **20060418160043] [Moved output forcing from REPL to RPC evaluator, so that it is forced after all RPCs, not just REPL ones. Taylor Campbell **20060418162822] [Moved output forcing from RPC evaluator to the Scheme48 run-time system by using PERIODICALLY-FORCE-OUTPUT!, rather than hoping that the I/O would be finished by the time the RPC finishes. Taylor Campbell **20060423232948] [Add definition of BREAKPOINT condition type. Taylor Campbell **20060524201555 Interrupting running threads now works again. Unfortunately, interrupting threads waiting for I/O still has no effect. ] [Fixed bug in APROPOS with variable types, and added information to output about primitive and integrated procedures. Taylor Campbell **20060622203903] [Refactored apropos to add functionality, to simplify the code, to fix a potentially lurking bug with non-symbolic bound names, and to paginate. Taylor Campbell **20060622232319 The `Exported symbols only?' question now determines whether to look through the exports of structures available in the config package or whether to look at the bindings visible inside a package, where before it was merged with the package specifier in an ad-hoc way. Nil for the package specifier now means either to look through all structures, if exported symbols only are interesting, or to look through the interaction environment, if not. ] [Moved implementation of general Swank RPCs into its own file general.scm. Taylor Campbell **20060630155423] [Regularized presentation of evaluation RPC results. Taylor Campbell **20060630183048] [Replaced ad-hoc circwrite.scm and limwrite.scm with an extended and more easily customizable writer. Taylor Campbell **20060630185610] [Change term `circular writing' to `shared writing' in order to reflect actual meaning more clearly. Taylor Campbell **20060630194504] [Substituted hybrid writing for limited or circular writing as appropriate. Taylor Campbell **20060630195110 Principles of new usage: - Use WRITE where machine-readability is necessary, human-readability is unnecessary / excessive output is unconsequential, shared structure is unimportant, and circular structure is known not to occur. Example: Swank I/O. - Use LIMITED-WRITE when machine-readability is *not* necessary, excessive output *is* desirable to avoid, and shared structure is unimportant or distracting. Circular structure is irrelevant. Example: showing S-expressions, such as source display in the debugger. - Use CIRCULAR-WRITE when machine-readability might or might not be necessary in the future but doesn't matter now, complete output outweights excessive output, and shared or circular structure might well be important. Example: REPL or inspector output. (Ideally, the pretty-printer would support shared structure, so that we could use CIRCULAR-WRITE where machine-readability is more important and CIRCULAR-PP where human-readability is more importnat.) - Use HYBRID-WRITE when human-readability trumps machine-readability, excessive output is undesirable, and shared or circular structure might well be important. Examples: fields of inspected objects; results of evaluation that will go into the minibuffer. - Use the pretty-printer only where requested by the user, since it is unsafe and also not very good. These shortcomings should be fixed at some point so that we can use the pretty-printer more. ] [Fix recording of file names in SWANK:COMPILE-STRING-FOR-EMACS so that the source file name given to the compiler at least works for package definitions, even if it is not correct. Taylor Campbell **20060710160040 The RPC implementation formerly would construct a complete file name from the buffer name and directory supplied, but this would confuse Scheme48 if the buffer were named `packages.scm<2>' or something, because Scheme48 thinks that `>' is a directory separator and would not strip the `packages.scm<2>' part at all when computing the names of other files in the same directory as the file in which the package was defined. This is necessary for loading files in packages to work at all, since otherwise they would be taken relatively, and changing the current working directory would screw up any unloaded packages. Fortunately, FILE-NAME-DIRECTORY is idempotent, so it is safe, for the purposes of the module system, to pass along only the directory. This means, though, that (%FILE-NAME%), from the SOURCE-FILE-NAMES structure, will evaluate to a directory name, not an actual file name, which is incorrect. Until SLIME passes a file name along with the directory path, however, this is the best we can do, and I don't *think* there will be much of a problem with %FILE-NAME%, since it is seldom used outside the module system, and even more seldom used without FILE-NAME-DIRECTORY anyway. ] [Update stub definitions of arglist RPCs for changes starting 2006-03-18 in SLIME that would make them fail spectacularly, not silently. Now they are back to failing silently. Taylor Campbell **20060710163249] [Change least specific inspector method to try DISCLOSE before giving up and passing the buck to the writer. Taylor Campbell **20060710201556] [Spiff up the inspector's presentation of templates and closures to name template header fields and to include templates' contents in closures. Taylor Campbell **20060710223555] [Regularize line separation in inspector presentations, and omit redundant output from simple data inspectors. Taylor Campbell **20060710223629 Every inspector presentation now ends with an empty line, and everything that generates subpresentations now ends with a newline and assumes that it will start on a fresh line. ] [Add inspection methods for tables and debug data. Taylor Campbell **20060710225223] [Expand presentation of locations, and guard it against undefined or unassigned ones. Taylor Campbell **20060711041220] [Fix the last change to the inspection method for vectors so that the length is interpreted as a literal number, not an integer label. Taylor Campbell **20060711041821] [Add inspection method for ports. Taylor Campbell **20060711223218] [Fix emission of short message option in compiler notes if the short message isn't actually there. Taylor Campbell **20060711223314] [Make session ids useful by making them unique to their respective Swank worlds, rather than the TCP server that created them, and by turning Swank worlds' sets of sessions into tables mapping session ids to sessions. Taylor Campbell **20060713051027] [Clean up top-level startup code and properly support single-session SLIME48. Taylor Campbell **20060713052935 The former mess of a procedure SPAWN-SLIME48-TCP-SERVER is now considerably cleaned up and better abstracted. There is now a separate operation for running a Swank server socket that accepts a solitary session and then closes. There is a new Emacs variable in slime48.el controlling the persistence of the server. ] [Add section on special packages in SLIME48 to the README. Taylor Campbell **20060719172650] [Ensure that the structures opened by the interaction environment are loaded in various commands that evaluate user code. Taylor Campbell **20060720181351] [Change the symbol completion routines to check the prefix string more carefully and to permit empty prefix strings, which have the effect of listing all bound symbols. Taylor R Campbell **20060721163143] [Tighten condition on which interactive evaluation results are shown in four radices: the value must be not only an integer but also exact, or otherwise Scheme48's NUMBER->STRING loses. Taylor R Campbell **20060914181949] [Add accidentally omittted newline after `Environment:' in inspector presentation of closures. Taylor Campbell **20060714094055] [Update inspector for changes to its interface in SLIME CVS. Taylor R Campbell **20060930013800 The table of inspected parts is now preserved for the duration of the inspection, and each whole object being inspected is included as well as its parts; whole objects are passed back with their identifiers as well as their titles, types, and contents. SWANK:INIT-INSPECTOR now accepts an optional second argument specifying whether or not to reset the inspection state. The procedure INSPECT-RESULTS now takes a required second argument specifying the same thing. This is an incompatible change to that exported procedure, but I doubt whether anyone actually relied on its old signature. ] [Revert INSPECT-RESULTS to a signature compatible with its original one by making the RESET? parameter optional, since it turns out that this procedure is used elsewhere (in SLDB, for example). Taylor R Campbell **20061008032822] [Open all of SWANK-SESSIONS in SWANK-COMPLETION-RPC structure, not just a limited subset of it. Taylor R Campbell **20061015213051] [Export SEND-SLDB-ACTIVATION and SEND-SLDB-RETURN from the SLDB interface. Taylor R Campbell **20061015220221] [Simplify and restructure the Swank environment construction mechanism. Taylor R Campbell **20061015221356] [Remove MAKE-SWANK-TCP-OUTPUT-PORT from SWANK-I/O-INTERFACE. Taylor R Campbell **20061015224630 If it is ever implemented, it can be returned to the interface, but as things are it just causes a spurious warning on startup. ] [Implement passage of messages back to the Emacs system when aborting Swank RPCs. Taylor R Campbell **20061015224813] [Permit name completion without any explicit package: use the interaction environment in that case. Taylor R Campbell **20061028194329] [Fix thread synchronization bug in Swank output: use ATTEMPT-COPY-BYTES!, not COPY-BYTES!, to move data from a port's buffer, since the buffer is concurrently updated and read. Taylor R Campbell **20061105233832] [Modify suggested entry on `slime-mode-hook' so that it sets `slime-buffer-package' always to a string, regardless of the type of the value in `scheme48-package', which may also be a symbol or a list. Taylor R Campbell **20061125173805] [Implement new RPCs COMPLETIONS-FOR-KEYWORD and COMPLETIONS-FOR-CHARACTER, with bogus but provisionally working definitions. Taylor R Campbell **20061125234940] [Expand package change notification, and ensure that Emacs always receives strings to identify packages, never symbols, in these notifications. Taylor R Campbell **20070201193904] [Fix bug in MAKE-FRAME-LOCAL-FOR-EMACS, which was giving Emacs symbols when it found generated names instead of those symbols' strings. Taylor R Campbell **20070312193425] [Fix bug in SWANK:EVAL-AND-GRAB-OUTPUT: the expression may yield zero values, which DELIMITED-OBJECT-LIST-STRING is not prepared to handle. Taylor R Campbell **20070314030713] [Simplify implementation of REPL presentation tables, and use ABORT-SWANK-RPC rather than ERROR when the table is absent. Taylor R Campbell **20070512181900] [Send (:ABORT) rather than (:ABORT reason) to abort a Swank RPC, because not everything in slime.el can handle an optional reason. Taylor R Campbell **20070512182350 This is a temporary kludge; it should be reverted once SLIME is fixed. ] [Fix Swank RPC names: SWANK-COMPILER-MACROEXPAND[-1], not COMPILER-MACROEXPAND[-1]. Taylor R Campbell **20070512192216] [Rename `scratch' to `user', and use the existing command processor's user environment to initialize SLIME48's user environment. Taylor R Campbell **20070512224833] [Implement rudimentary Swank protocol version detection. Taylor R Campbell **20070512225509 This is a provisional kludge to avoid having to silence the protocol version mismatch warnings every time SLIME48 starts up. ] [New Swank RPCs LIST-ALL-SYSTEMS-KNOWN-TO-ASDF and LIST-ASDF-SYSTEMS, which are currently identical to LIST-ALL-SYSTEMS-IN-CENTRAL-REGISTRY. Taylor R Campbell **20070512215420 We take `ASDF' to mean just `the module system'. ] [Update inspector so that SWANK:INIT-INSPECTOR accepts :EVAL, :RESET, and :DWIM-MODE keyword arguments, per the RPC's new signature in CVS SLIME. Taylor R Campbell **20070512215929] [Update REPL for CVS SLIME's new REPL output protocol. Taylor R Campbell **20070512220003 This is not the best way to go about it: the new protocol allows for the output to be generated incrementally, so that we don't need to store it in one gigantic string. At some point, we also want to implement nested presentations, which are easier with the new protocol. ] [Add faux ChangeLog for SLIME version kludge. Taylor R Campbell **20070513152859] [Update README to reflect renaming `scratch' to `user'. Taylor R Campbell **20070513154830] [Update SLIME ChangeLog date to 2007-05-13. Taylor R Campbell **20070513155004] [Add new Swank RPCs LIST-ALL-SYSTEMS-KNOWN-TO-ASDF and LIST-ASDF-SYSTEMS to the appropriate interface. (Oops.) Taylor R Campbell **20070604193503] [Force output of interactively evaluated expressions before sending back their values. Taylor R Campbell **20070607060710] [Eliminate vestigial cruft from SWNANK:LISTENER-EVAL in repl.scm. Taylor R Campbell **20070607060850]