Changeset 3416
- Timestamp:
- 07/09/08 07:52:08 (6 months ago)
- Files:
-
- trunk/thirdparty/slime/CVS/Entries (modified) (1 diff)
- trunk/thirdparty/slime/ChangeLog (modified) (1 diff)
- trunk/thirdparty/slime/contrib/CVS/Entries (modified) (1 diff)
- trunk/thirdparty/slime/contrib/ChangeLog (modified) (1 diff)
- trunk/thirdparty/slime/contrib/slime-parse.el (modified) (1 diff)
- trunk/thirdparty/slime/contrib/swank-asdf.lisp (modified) (1 diff)
- trunk/thirdparty/slime/doc/CVS/Entries (modified) (1 diff)
- trunk/thirdparty/slime/slime.el (modified) (19 diffs)
- trunk/thirdparty/slime/swank-allegro.lisp (modified) (1 diff)
- trunk/thirdparty/slime/swank-backend.lisp (modified) (1 diff)
- trunk/thirdparty/slime/swank-cmucl.lisp (modified) (2 diffs)
- trunk/thirdparty/slime/swank-lispworks.lisp (modified) (1 diff)
- trunk/thirdparty/slime/swank-sbcl.lisp (modified) (8 diffs)
- trunk/thirdparty/slime/swank.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/thirdparty/slime/CVS/Entries
r3147 r3416 1 1 D/contrib//// 2 2 D/doc//// 3 /.cvsignore/1.5/Tue Mar 11 05:01:33 2008//4 /NEWS/1.9/Tue Mar 11 05:01:33 2008//5 /PROBLEMS/1.8/Tue Mar 11 05:01:33 2008//6 /README/1.14/Tue Mar 11 05:01:33 2008//7 /hyperspec.el/1.11/Tue Mar 11 05:01:33 2008//8 /metering.lisp/1.4/Tue Mar 11 05:01:33 2008//9 /mkdist.sh/1.7/Tue Mar 11 05:01:33 2008//10 /nregex.lisp/1.4/Tue Mar 11 05:01:33 2008//11 /sbcl-pprint-patch.lisp/1.1/Tue Mar 11 05:01:33 2008//12 /slime-autoloads.el/1.5/Wed Mar 12 07:05:18 2008//13 /swank-gray.lisp/1.10/Tue Mar 11 05:01:33 2008//14 /test-all.sh/1.2/Tue Mar 11 05:01:33 2008//15 /test.sh/1.10/Wed Mar 12 07:05:31 2008//16 /xref.lisp/1.2/Tue Mar 11 05:01:33 2008//17 /HACKING/1.9/Fri Apr 4 05:23:12 2008//18 /swank-source-path-parser.lisp/1.20/Fri Apr 4 05:23:12 2008//19 /ChangeLog/1.1353/Mon May 12 18:52:03 2008//20 /slime.el/1.938/Mon May 12 18:52:03 2008//21 /swank-abcl.lisp/1.49/Mon May 12 18:52:03 2008//22 /swank-allegro.lisp/1.102/Mon May 12 18:52:03 2008//23 /swank-backend.lisp/1.132/Result of merge//24 /swank-clisp.lisp/1.69/Mon May 12 18:52:04 2008//25 /swank-cmucl.lisp/1.179/Result of merge//26 /swank-corman.lisp/1.16/Mon May 12 18:52:05 2008//27 /swank-ecl.lisp/1.23/Mon May 12 18:52:05 2008//28 /swank-lispworks.lisp/1.99/Mon May 12 18:52:05 2008//29 3 /swank-loader.lisp/1.85/Result of merge// 30 4 /swank-openmcl.lisp/1.125/Mon May 12 18:52:05 2008// 31 /swank-sbcl.lisp/1.195/Mon May 12 18:52:05 2008// 32 /swank-scl.lisp/1.19/Mon May 12 18:52:05 2008// 33 /swank-source-file-cache.lisp/1.9/Mon May 12 18:52:05 2008// 34 /swank.asd/1.9/Mon May 12 18:52:05 2008// 35 /swank.lisp/1.543/Result of merge// 5 /.cvsignore/1.5/Mon Jun 30 06:11:05 2008// 6 /ChangeLog/1.1367/Wed Jul 9 05:10:01 2008// 7 /HACKING/1.9/Mon Jun 30 06:11:05 2008// 8 /NEWS/1.9/Mon Jun 30 06:11:05 2008// 9 /PROBLEMS/1.8/Mon Jun 30 06:11:05 2008// 10 /README/1.14/Mon Jun 30 06:11:05 2008// 11 /hyperspec.el/1.11/Mon Jun 30 06:11:05 2008// 12 /metering.lisp/1.4/Mon Jun 30 06:11:05 2008// 13 /mkdist.sh/1.7/Mon Jun 30 06:11:05 2008// 14 /nregex.lisp/1.4/Mon Jun 30 06:11:05 2008// 15 /sbcl-pprint-patch.lisp/1.1/Mon Jun 30 06:11:05 2008// 16 /slime-autoloads.el/1.5/Mon Jun 30 06:11:05 2008// 17 /slime.el/1.944/Wed Jul 9 05:10:01 2008// 18 /swank-abcl.lisp/1.49/Mon Jun 30 06:11:05 2008// 19 /swank-allegro.lisp/1.103/Wed Jul 9 05:10:01 2008// 20 /swank-backend.lisp/1.133/Result of merge// 21 /swank-clisp.lisp/1.69/Mon Jun 30 06:11:05 2008// 22 /swank-cmucl.lisp/1.181/Result of merge// 23 /swank-corman.lisp/1.16/Mon Jun 30 06:11:05 2008// 24 /swank-ecl.lisp/1.23/Mon Jun 30 06:11:05 2008// 25 /swank-gray.lisp/1.10/Mon Jun 30 06:11:05 2008// 26 /swank-lispworks.lisp/1.100/Wed Jul 9 05:10:01 2008// 27 /swank-sbcl.lisp/1.198/Wed Jul 9 05:10:01 2008// 28 /swank-scl.lisp/1.19/Mon Jun 30 06:11:05 2008// 29 /swank-source-file-cache.lisp/1.9/Mon Jun 30 06:11:05 2008// 30 /swank-source-path-parser.lisp/1.20/Mon Jun 30 06:11:05 2008// 31 /swank.asd/1.9/Mon Jun 30 06:11:05 2008// 32 /swank.lisp/1.546/Result of merge// 33 /test-all.sh/1.2/Mon Jun 30 06:11:05 2008// 34 /test.sh/1.10/Mon Jun 30 06:11:05 2008// 35 /xref.lisp/1.2/Mon Jun 30 06:11:05 2008// trunk/thirdparty/slime/ChangeLog
r3147 r3416 1 2008-07-05 Tobias C. Rittweiler <tcr@freebits.de> 2 3 * swank.lisp: Revert Melis' change from 2008-07-04; Global IO 4 redirection seems currently to be broken, and while it's not due 5 to that commit (it seems that it's been broken since longer), I 6 want to be on a safe bet. 7 8 2008-07-05 Tobias C. Rittweiler <tcr@freebits.de> 9 10 `M-x slime-lisp-threads' will now contain a summary of what's 11 currently executed in a thread that was created by Swank. 12 13 * swank-backend.lisp (thread-description, set-thread-description): 14 New interface functions to associate strings with threads. 15 * swank-sbcl.lisp (thread-description, set-thread-description): 16 Implemented. 17 18 * swank.lisp (call-with-thread-description), 19 (with-thread-description): New. 20 (read-from-emacs): Now temporarily sets the thread-description of 21 the current thread to a summary of what's going to be executed by 22 the current request. 23 (defslimefun list-threads): Changed return value to also contain 24 a thread's description. 25 26 * slime.el (slime-list-threads, slime-thread-insert): Adapted to 27 new return value of LIST-THREADS. 28 29 2008-07-04 Gábor Melis <mega@retes.hu> 30 31 * swank.lisp (call-with-redirected-io): Rebind only standard 32 streams if *GLOBALLY-REDIRECT-IO*. Fixes lost output after 33 disconnect, reconnect. 34 35 2008-07-04 Willem Broekema <metawilm@gmail.com> 36 37 * slime-allegro.lisp (fspec-definition-locations): Workaround for 38 the issue that Allegro does not record the source file location 39 for methods defined inside a defgeneric form. The idea is that if 40 the source location of a method is not found, then the defgeneric 41 form is almost certainly the right place. 42 43 2008-07-04 Tobias C. Rittweiler <tcr@freebits.de> 44 45 * slime.el (slime-call-defun): Properly signal error message when 46 used in a context that is not a function definition. 47 48 2008-07-04 Richard M Kreuter <kreuter@progn.net> 49 50 * swank-sbcl.lisp (code-location-source-location), 51 (code-location-debug-source-name): Patched for incompatible 52 structure change in SBCL 1.0.18.10. 53 54 2008-07-04 Tobias C. Rittweiler <tcr@freebits.de> 55 56 * slime.el (slime-call-defun): Broken on DEFMETHOD forms. Fix 57 that. Also, don't insert package qualifier anymore if the inserted 58 qualifier is the same as the current REPL package. 59 60 2008-07-02 Martin Simmons <martin@lispworks.com> 61 * swank-lispworks.lisp (install-debugger-globally): hook into the 62 environment globally to catch BREAK. 63 64 2008-06-07 Tobias C. Rittweiler <tcr@freebits.de> 65 66 * slime.el (def-slime-test find-definition.2, arglist): 67 SWANK:COMPILE-STRING-FOR-EMACS since recently takes 5 instead of 4 68 parameters. Fix that. 69 70 2008-06-07 Tobias C. Rittweiler <tcr@freebits.de> 71 72 * slime.el (slime-extract-context, slime-parse-context): Recognize 73 more toplevel forms, e.g. DEFINE-COMPILER-MACRO &c. Such that 74 `slime-parse-toplevel-form' will also recognize these. 75 (slime-trace-query): Adapted to above changes. Errors if spec is 76 untraceable. 77 (slime-call-defun): Adapted to also support the new toplevel forms. 78 79 (slime-cl-symbol-name), 80 (slime-cl-symbol-package), 81 (slime-qualify-cl-symbol-name): Resurrected from the `slime-parse' 82 contrib, as they've been used by `slime-call-defun'. 83 84 2008-06-02 Raymond Toy <toy.raymond@gmail.com> 85 86 Unicode support for CMUCL. 87 88 * swank-cmucl.lisp (accept-connection, make-socket-io-stream): 89 Handle external-format argument. 90 (find-external-format): Implemented. 91 (*external-format-to-coding-system*): New variable. 92 93 2008-05-19 Helmut Eller <heller@common-lisp.net> 94 95 * swank-sbcl.lisp: Don't require asdf. 96 97 2008-05-19 Helmut Eller <heller@common-lisp.net> 98 99 * swank-sbcl.lisp (swank-compile-string): Add reader-conditionals 100 for sb-ext::restrict-compiler-policy. 101 102 2008-05-19 Geo Carncross <geocar@gmail.com> 103 104 * contrib/swank-asdf.lisp: Require asdf. 105 106 2008-05-17 Helmut Eller <heller@common-lisp.net> 107 108 * slime.el (slime-prin1-to-string): Bind print-length and 109 print-level. 110 111 2008-05-17 Helmut Eller <heller@common-lisp.net> 112 113 * slime.el (slime-inspector-limit): New variable. 114 (slime-inspector-insert-content): Use it. 115 (slime-inspector-fetch-chunk, slime-inspector-fetch) 116 (slime-inspector-next-range, slime-inspector-join-chunks): New. 117 1 118 2008-05-08 Geo Carncross <geocar@gmail.com> 2 119 trunk/thirdparty/slime/contrib/CVS/Entries
r3147 r3416 1 / README/1.3/Tue Mar 11 05:01:332008//2 / bridge.el/1.1/Tue Mar 11 05:01:332008//3 / inferior-slime.el/1.2/Tue Mar 11 05:01:332008//4 / slime-asdf.el/1.3/Tue Mar 11 05:01:332008//5 /slime- banner.el/1.4/Tue Mar 11 05:01:332008//6 /slime- c-p-c.el/1.9/Tue Mar 11 05:01:332008//7 /slime- editing-commands.el/1.6/Tue Mar 11 05:01:332008//8 /slime- fancy-inspector.el/1.3/Tue Mar 11 05:01:332008//9 /slime- fancy.el/1.5/Tue Mar 11 05:01:332008//10 /slime- highlight-edits.el/1.3/Tue Mar 11 05:01:332008//11 /slime- motd.el/1.1/Tue Mar 11 05:01:332008//12 /slime- parse.el/1.10/Tue Mar 11 05:01:332008//13 /slime- presentation-streams.el/1.2/Tue Mar 11 05:01:332008//14 /slime- references.el/1.4/Tue Mar 11 05:01:332008//15 /slime- scheme.el/1.1/Tue Mar 11 05:01:332008//16 /slime- scratch.el/1.4/Tue Mar 11 05:01:332008//17 /slime- typeout-frame.el/1.6/Tue Mar 11 05:01:332008//18 /slime- xref-browser.el/1.2/Tue Mar 11 05:01:332008//19 /s wank-asdf.lisp/1.1/Tue Mar 11 05:01:332008//20 /s wank-c-p-c.lisp/1.2/Tue Mar 11 05:01:332008//21 /s wank-goo.goo/1.1/Tue Mar 11 05:01:332008//22 /s wank-indentation.lisp/1.1/Tue Mar 11 05:01:332008//23 /s wank-listener-hooks.lisp/1.1/Tue Mar 11 05:01:332008//24 /s wank-motd.lisp/1.1/Tue Mar 11 05:01:332008//25 /swank- presentation-streams.lisp/1.5/Tue Mar 11 05:01:332008//26 /swank- presentations.lisp/1.5/Tue Mar 11 05:01:332008//27 /s lime-fuzzy.el/1.7/Fri Mar 14 15:35:512008//28 /swank-f uzzy.lisp/1.8/Fri Mar 14 15:35:522008//29 /s lime-autodoc.el/1.8/Fri Apr 4 05:23:142008//30 /s lime-tramp.el/1.3/Fri Apr 4 05:23:142008//31 /swank- mit-scheme.scm/1.3/Fri Apr 4 05:23:162008//32 / ChangeLog/1.106/Mon May 12 18:52:062008//33 /s lime-indentation.el/1.2/Mon May 12 18:52:062008//34 /s lime-presentations.el/1.15/Mon May 12 18:52:062008//35 /swank- arglists.lisp/1.21/Mon May 12 18:52:062008//36 /swank- fancy-inspector.lisp/1.15/Mon May 12 18:52:062008//37 /swank- kawa.scm/1.7/Mon May 12 18:52:062008//1 /ChangeLog/1.107/Wed Jul 9 05:10:01 2008// 2 /README/1.3/Mon Jun 30 06:11:05 2008// 3 /bridge.el/1.1/Mon Jun 30 06:11:05 2008// 4 /inferior-slime.el/1.2/Mon Jun 30 06:11:05 2008// 5 /slime-asdf.el/1.3/Mon Jun 30 06:11:05 2008// 6 /slime-autodoc.el/1.8/Mon Jun 30 06:11:05 2008// 7 /slime-banner.el/1.4/Mon Jun 30 06:11:05 2008// 8 /slime-c-p-c.el/1.9/Mon Jun 30 06:11:05 2008// 9 /slime-editing-commands.el/1.6/Mon Jun 30 06:11:05 2008// 10 /slime-fancy-inspector.el/1.3/Mon Jun 30 06:11:05 2008// 11 /slime-fancy.el/1.5/Mon Jun 30 06:11:05 2008// 12 /slime-fuzzy.el/1.7/Mon Jun 30 06:11:05 2008// 13 /slime-highlight-edits.el/1.3/Mon Jun 30 06:11:05 2008// 14 /slime-indentation.el/1.2/Mon Jun 30 06:11:05 2008// 15 /slime-motd.el/1.1/Mon Jun 30 06:11:05 2008// 16 /slime-parse.el/1.11/Wed Jul 9 05:10:02 2008// 17 /slime-presentation-streams.el/1.2/Mon Jun 30 06:11:05 2008// 18 /slime-presentations.el/1.15/Mon Jun 30 06:11:05 2008// 19 /slime-references.el/1.4/Mon Jun 30 06:11:05 2008// 20 /slime-scheme.el/1.1/Mon Jun 30 06:11:05 2008// 21 /slime-scratch.el/1.4/Mon Jun 30 06:11:05 2008// 22 /slime-tramp.el/1.3/Mon Jun 30 06:11:05 2008// 23 /slime-typeout-frame.el/1.6/Mon Jun 30 06:11:05 2008// 24 /slime-xref-browser.el/1.2/Mon Jun 30 06:11:05 2008// 25 /swank-arglists.lisp/1.21/Mon Jun 30 06:11:05 2008// 26 /swank-asdf.lisp/1.3/Wed Jul 9 05:10:02 2008// 27 /swank-c-p-c.lisp/1.2/Mon Jun 30 06:11:05 2008// 28 /swank-fancy-inspector.lisp/1.15/Mon Jun 30 06:11:05 2008// 29 /swank-fuzzy.lisp/1.8/Mon Jun 30 06:11:05 2008// 30 /swank-goo.goo/1.1/Mon Jun 30 06:11:05 2008// 31 /swank-indentation.lisp/1.1/Mon Jun 30 06:11:05 2008// 32 /swank-kawa.scm/1.7/Mon Jun 30 06:11:05 2008// 33 /swank-listener-hooks.lisp/1.1/Mon Jun 30 06:11:05 2008// 34 /swank-mit-scheme.scm/1.3/Mon Jun 30 06:11:05 2008// 35 /swank-motd.lisp/1.1/Mon Jun 30 06:11:05 2008// 36 /swank-presentation-streams.lisp/1.5/Mon Jun 30 06:11:05 2008// 37 /swank-presentations.lisp/1.5/Mon Jun 30 06:11:05 2008// 38 38 D trunk/thirdparty/slime/contrib/ChangeLog
r3147 r3416 1 2008-06-07 Tobias C. Rittweiler <tcr@freebits.de> 2 3 * slime-parse.el (slime-cl-symbol-name), 4 (slime-cl-symbol-package), 5 (slime-qualify-cl-symbol-name): Moved back to `slime.el' as 6 they're still used there. 7 1 8 2008-04-17 Gábor Melis <mega@retes.hu> 2 9 trunk/thirdparty/slime/contrib/slime-parse.el
r2410 r3416 26 26 (slime-make-form-spec-from-string 27 27 (concat (slime-incomplete-sexp-at-point) ")")))))))) 28 29 ;; XXX: unused function30 (defun slime-cl-symbol-external-ref-p (symbol)31 "Does SYMBOL refer to an external symbol?32 FOO:BAR is an external reference.33 FOO::BAR is not, and nor is BAR."34 (let ((name (if (stringp symbol) symbol (symbol-name symbol))))35 (and (string-match ":" name)36 (not (string-match "::" name)))))37 38 (defun slime-cl-symbol-name (symbol)39 (let ((n (if (stringp symbol) symbol (symbol-name symbol))))40 (if (string-match ":\\([^:]*\\)$" n)41 (let ((symbol-part (match-string 1 n)))42 (if (string-match "^|\\(.*\\)|$" symbol-part)43 (match-string 1 symbol-part)44 symbol-part))45 n)))46 47 (defun slime-cl-symbol-package (symbol &optional default)48 (let ((n (if (stringp symbol) symbol (symbol-name symbol))))49 (if (string-match "^\\([^:]*\\):" n)50 (match-string 1 n)51 default)))52 53 ;; XXX: unused function54 (defun slime-qualify-cl-symbol (symbol-or-name)55 "Like `slime-qualify-cl-symbol-name', but interns the result."56 (intern (slime-qualify-cl-symbol-name symbol-or-name)))57 58 (defun slime-qualify-cl-symbol-name (symbol-or-name)59 "Return a package-qualified symbol-name that indicates the CL symbol60 SYMBOL. If SYMBOL doesn't already have a package prefix the current61 package is used."62 (let ((s (if (stringp symbol-or-name)63 symbol-or-name64 (symbol-name symbol-or-name))))65 (if (slime-cl-symbol-package s)66 s67 (format "%s::%s"68 (let* ((package (slime-current-package)))69 ;; package is a string like ":cl-user" or "CL-USER".70 (if (and package (string-match "^:" package))71 (substring package 1)72 package))73 (slime-cl-symbol-name s)))))74 75 28 76 29 (defun slime-parse-sexp-at-point (&optional n skip-blanks-p) trunk/thirdparty/slime/contrib/swank-asdf.lisp
r2200 r3416 9 9 10 10 (in-package :swank) 11 12 (eval-when (:compile-toplevel :load-toplevel :execute) 13 (require :asdf)) 11 14 12 15 (defslimefun operate-on-system-for-emacs (system-name operation &rest keywords) trunk/thirdparty/slime/doc/CVS/Entries
r2721 r3416 1 /.cvsignore/1.1/ Tue Mar 11 05:01:31 2008//2 /Makefile/1.12/ Tue Mar 11 05:01:31 2008//3 /slime-refcard.pdf/1.1/ Tue Mar 11 05:01:31 2008//4 /slime-refcard.tex/1.1/ Tue Mar 11 05:01:31 2008//5 /slime-small.eps/1.1/ Tue Mar 11 05:01:31 2008//6 /slime-small.pdf/1.1/ Tue Mar 11 05:01:31 2008//7 /slime.texi/1.64/ Tue Mar 11 05:01:31 2008//8 /texinfo-tabulate.awk/1.2/ Tue Mar 11 05:01:31 2008//1 /.cvsignore/1.1/Mon Jun 30 06:11:01 2008// 2 /Makefile/1.12/Mon Jun 30 06:11:01 2008// 3 /slime-refcard.pdf/1.1/Mon Jun 30 06:11:01 2008// 4 /slime-refcard.tex/1.1/Mon Jun 30 06:11:01 2008// 5 /slime-small.eps/1.1/Mon Jun 30 06:11:01 2008// 6 /slime-small.pdf/1.1/Mon Jun 30 06:11:01 2008// 7 /slime.texi/1.64/Mon Jun 30 06:11:01 2008// 8 /texinfo-tabulate.awk/1.2/Mon Jun 30 06:11:01 2008// 9 9 D trunk/thirdparty/slime/slime.el
r3147 r3416 1665 1665 This is more compatible with the CL reader." 1666 1666 (with-temp-buffer 1667 (let ((print-escape-nonascii nil) 1668 (print-escape-newlines nil)) 1667 (let (print-escape-nonascii 1668 print-escape-newlines 1669 print-length 1670 print-level) 1669 1671 (prin1 sexp (current-buffer)) 1670 1672 (buffer-string)))) … … 4498 4500 (let ((spec (read el))) 4499 4501 (if (eq (car spec) 'EQL) 4500 (concat ".*?\\n\\{0,1\\}.*?(EQL.*?'\\{0,1\\}" (format "%s" (second spec)) ")") 4502 (concat ".*?\\n\\{0,1\\}.*?(EQL.*?'\\{0,1\\}" 4503 (format "%s" (second spec)) ")") 4501 4504 (error "don't understand specializer: %s,%s" el (car spec)))) 4502 4505 (concat ".+?\n\\{0,1\\}.+?\\<" el "\\>"))) … … 4563 4566 (slime-search-call-site fname))) 4564 4567 (point))) 4565 4566 (defmacro slime-point-moves-p (&rest body)4567 "Execute BODY and return true if the current buffer's point moved."4568 (let ((pointvar (gensym "point-")))4569 `(let ((,pointvar (point)))4570 (save-current-buffer ,@body)4571 (/= ,pointvar (point)))))4572 4573 (put 'slime-point-moves-p 'lisp-indent-function 0)4574 4575 (defun slime-forward-sexp (&optional count)4576 "Like `forward-sexp', but understands reader-conditionals (#- and #+)."4577 (dotimes (i (or count 1))4578 (while (slime-point-moves-p (slime-forward-blanks)4579 (slime-forward-reader-comment)4580 (slime-forward-reader-conditional)))4581 (forward-sexp)))4582 4583 (defun slime-forward-blanks ()4584 "Move forward over all whitespace and newlines at point."4585 (ignore-errors4586 (while (slime-point-moves-p4587 (skip-syntax-forward " ")4588 ;; newlines aren't in lisp-mode's whitespace syntax class4589 (when (eolp) (forward-char))))))4590 4591 ;; Emacs 21's forward-sexp understands #| |# comments in lisp-mode4592 ;; buffers, but (at least) Emacs 20's doesn't, so here it is.4593 (defun slime-forward-reader-comment ()4594 "Move forward over #|...|# reader comments. The comments may be nested."4595 (when (looking-at "#|")4596 (goto-char (match-end 0))4597 (while (not (looking-at "|#"))4598 (re-search-forward (regexp-opt '("|#" "#|")))4599 (goto-char (match-beginning 0))4600 (when (looking-at "#|") ; nested comment4601 (slime-forward-reader-comment)))4602 (goto-char (match-end 0))))4603 4604 (defun slime-forward-reader-conditional ()4605 "Move past any reader conditional (#+ or #-) at point."4606 (when (or (looking-at "#\\+")4607 (looking-at "#-"))4608 (goto-char (match-end 0))4609 (let* ((plus-conditional-p (eq (char-before) ?+))4610 (result (slime-eval-feature-conditional (read (current-buffer)))))4611 (unless (if plus-conditional-p result (not result))4612 ;; skip this sexp4613 (slime-forward-sexp)))))4614 4615 (defun slime-keywordify (symbol)4616 "Make a keyword out of the symbol SYMBOL."4617 (let ((name (downcase (symbol-name symbol))))4618 (intern (if (eq ?: (aref name 0))4619 name4620 (concat ":" name)))))4621 4622 (defun slime-eval-feature-conditional (e)4623 "Interpret a reader conditional expression."4624 (if (symbolp e)4625 (memq (slime-keywordify e) (slime-lisp-features))4626 (funcall (ecase (slime-keywordify (car e))4627 (:and #'every)4628 (:or #'some)4629 (:not (lambda (f l) (not (apply f l)))))4630 #'slime-eval-feature-conditional4631 (cdr e))))4632 4568 4633 4569 … … 5389 5325 5390 5326 (defun slime-call-defun () 5391 "Insert a call to the function defined around point into the REPL." 5392 (interactive) 5393 (let ((toplevel (slime-parse-toplevel-form))) 5394 (unless (and (consp toplevel) 5395 (member (car toplevel) '(:defun :defmethod :defgeneric)) 5396 (symbolp (cadr toplevel))) 5397 (error "Not in a function definition")) 5398 (let* ((symbol (cadr toplevel)) 5399 (function-call 5400 (format "(%s " (slime-qualify-cl-symbol-name symbol)))) 5401 (slime-switch-to-output-buffer) 5402 (goto-char slime-repl-input-start-mark) 5403 (insert function-call) 5404 (save-excursion (insert ")"))))) 5327 "Insert a call to the toplevel form defined around point into the REPL." 5328 (interactive) 5329 (flet ((insert-call (symbol) 5330 (let* ((qualified-symbol-name (slime-qualify-cl-symbol-name symbol)) 5331 (symbol-name (slime-cl-symbol-name qualified-symbol-name)) 5332 (symbol-package (slime-cl-symbol-package qualified-symbol-name)) 5333 (function-call 5334 (format "(%s " (if (equalp (slime-lisp-package) symbol-package) 5335 symbol-name 5336 qualified-symbol-name)))) 5337 (slime-switch-to-output-buffer) 5338 (goto-char slime-repl-input-start-mark) 5339 (insert function-call) 5340 (save-excursion (insert ")"))))) 5341 (let ((toplevel (slime-parse-toplevel-form))) 5342 (if (symbolp toplevel) 5343 (error "Not in a function definition") 5344 (destructure-case toplevel 5345 (((:defun :defgeneric :defmacro :define-compiler-macro) symbol) 5346 (insert-call symbol)) 5347 ((:defmethod symbol &rest args) 5348 (declare (ignore args)) 5349 (insert-call symbol)) 5350 (t 5351 (error "Not in a function definition"))))))) 5405 5352 5406 5353 ;;;; Edit Lisp value … … 5501 5448 ((setf n) 5502 5449 (slime-read-from-minibuffer "(Un)trace: " (prin1-to-string spec))) 5503 (( (:defun :defmacro)n)5450 ((:defun n) 5504 5451 (slime-read-from-minibuffer "(Un)trace: " (prin1-to-string n))) 5505 5452 ((:defgeneric n) … … 5528 5475 (((:labels :flet) &rest _) 5529 5476 (slime-read-from-minibuffer "(Un)trace local function: " 5530 (prin1-to-string spec))))))) 5477 (prin1-to-string spec))) 5478 (t (error "Don't know how to trace the spec ~S" spec)))))) 5531 5479 5532 5480 (defun slime-extract-context () … … 5542 5490 (defun ... (...) ... (n.ame ...) ...) -> (:call (:defun ...) name) 5543 5491 (defun ... (...) ... (setf (n.ame ...) -> (:call (:defun ...) (setf name)) 5492 5493 (defmacro n.ame (...) ...) -> (:defmacro name) 5494 (defsetf n.ame (...) ...) -> (:defsetf name) 5495 (define-setf-expander n.ame (...) ...) -> (:define-setf-expander name) 5496 (define-modify-macro n.ame (...) ...) -> (:define-modify-macro name) 5497 (define-compiler-macro n.ame (...) ...) -> (:define-compiler-macro name) 5544 5498 5545 5499 For other contexts we return the symbol at point." … … 5585 5539 (t 5586 5540 `(:call ,toplevel ,name))))) 5541 ((slime-in-expression-p '(define-compiler-macro *)) 5542 `(:define-compiler-macro ,name)) 5543 ((slime-in-expression-p '(define-modify-macro *)) 5544 `(:define-modify-macro ,name)) 5545 ((slime-in-expression-p '(define-setf-expander *)) 5546 `(:define-setf-expander ,name)) 5547 ((slime-in-expression-p '(defsetf *)) 5548 `(:defsetf ,name)) 5587 5549 (t 5588 5550 name)))) … … 5626 5588 5627 5589 (defun slime-parse-toplevel-form () 5628 (save-excursion 5629 (beginning-of-defun) 5630 (down-list 1) 5631 (forward-sexp 1) 5632 (slime-parse-context (read (current-buffer))))) 5590 (ignore-errors ; (foo) 5591 (save-excursion 5592 (beginning-of-defun) 5593 (down-list 1) 5594 (forward-sexp 1) 5595 (slime-parse-context (read (current-buffer)))))) 5633 5596 5634 5597 (defun slime-arglist-specializers (arglist) … … 6208 6171 (goto-char point)))))))) 6209 6172 6210 6211 6173 (defun slime-macroexpand-1 (&optional repeatedly) 6212 6174 "Display the macro expansion of the form at point. The form is … … 7172 7134 (erase-buffer) 7173 7135 (loop for idx from 0 7174 for ( name status id) in threads7175 do (slime-thread-insert idx name status id))7136 for (id name status desc) in threads 7137 do (slime-thread-insert idx name status desc id)) 7176 7138 (goto-char (point-min)) 7177 7139 (setq buffer-read-only t) 7178 7140 (pop-to-buffer (current-buffer)))))) 7179 7141 7180 (defun slime-thread-insert (idx name s ummary id)7142 (defun slime-thread-insert (idx name status summary id) 7181 7143 (slime-propertize-region `(thread-id ,idx) 7182 7144 (insert (format "%3s: " id)) … … 7184 7146 (insert-char ?\ (- 30 (current-column))) 7185 7147 (let ((summary-start (point))) 7148 (insert " " status) 7186 7149 (insert " " summary) 7187 7150 (unless (bolp) (insert "\n")) … … 7414 7377 (move-to-column (cdr point))))))))) 7415 7378 7379 (defvar slime-inspector-limit 500) 7380 7416 7381 (defun slime-inspector-insert-content (content) 7417 (destructuring-bind (ispecs len start end) content 7418 (slime-inspector-insert-range ispecs len start end t t))) 7419 7420 (defun slime-inspector-insert-range (ispecs len start end prev next) 7421 "Insert ISPECS at point. 7422 LEN is the length of the entire content on the Lisp side. 7423 START and END are the positions of the subsequnce that ISPECS represents. 7424 If PREV resp. NEXT are true insert range-buttons as needed." 7425 (let ((limit 2000)) 7382 (slime-inspector-fetch-chunk 7383 content nil 7384 (lambda (chunk) 7385 (let ((inhibit-read-only t)) 7386 (slime-inspector-insert-chunk chunk t t))))) 7387 7388 (defun slime-inspector-insert-chunk (chunk prev next) 7389 "Insert CHUNK at point. 7390 If PREV resp. NEXT are true insert more-buttons as needed." 7391 (destructuring-bind (ispecs len start end) chunk 7426 7392 (when (and prev (> start 0)) 7427 (slime-inspector-insert- range-button (max 0 (- start limit))start t))7393 (slime-inspector-insert-more-button start t)) 7428 7394 (mapc #'slime-inspector-insert-ispec ispecs) 7429 7395 (when (and next (< end len)) 7430 (slime-inspector-insert- range-button end (min len (+ end limit))nil))))7396 (slime-inspector-insert-more-button end nil)))) 7431 7397 7432 7398 (defun slime-inspector-insert-ispec (ispec) … … 7479 7445 (push (slime-inspector-position) slime-inspector-mark-stack)) 7480 7446 (range-button 7481 (slime-inspector-fetch- range range-button))7447 (slime-inspector-fetch-more range-button)) 7482 7448 (action-number 7483 7449 (slime-eval-async `(swank::inspector-call-nth-action ,action-number) … … 7604 7570 (slime-open-inspector parts point))))) 7605 7571 7606 (defun slime-inspector-insert- range-button (start endprevious)7572 (defun slime-inspector-insert-more-button (index previous) 7607 7573 (slime-insert-propertized 7608 (list 'slime-range-button (list start endprevious)7574 (list 'slime-range-button (list index previous) 7609 7575 'mouse-face 'highlight 7610 7576 'face 'slime-inspector-action-face) 7611 7577 (if previous " [--more--]\n" " [--more--]"))) 7612 7578 7613 (defun slime-inspector-fetch- range (button)7614 (destructuring-bind ( start end previous) button7615 (slime- eval-async7616 `(swank:inspector-range ,start ,end)7617 (slime-rcurry 7618 (lambda (c ontentprev)7579 (defun slime-inspector-fetch-more (button) 7580 (destructuring-bind (index prev) button 7581 (slime-inspector-fetch-chunk 7582 (list '() (1+ index) index index) prev 7583 (slime-rcurry 7584 (lambda (chunk prev) 7619 7585 (let ((inhibit-read-only t)) 7620 7586 (apply #'delete-region (slime-property-bounds 'slime-range-button)) 7621 (destructuring-bind (i l s e) content 7622 (slime-inspector-insert-range i l s e prev (not prev))))) 7623 previous)))) 7587 (slime-inspector-insert-chunk chunk prev (not prev)))) 7588 prev)))) 7589 7590 (defun slime-inspector-fetch-chunk (chunk prev cont) 7591 (slime-inspector-fetch chunk slime-inspector-limit prev cont)) 7592 7593 (defun slime-inspector-fetch (chunk limit prev cont) 7594 (destructuring-bind (from to) (slime-inspector-next-range chunk limit prev) 7595 (cond ((and from to) 7596 (slime-eval-async 7597 `(swank:inspector-range ,from ,to) 7598 (slime-rcurry (lambda (chunk2 chunk1 limit prev cont) 7599 (slime-inspector-fetch 7600 (slime-inspector-join-chunks chunk1 chunk2) 7601 limit prev cont)) 7602 chunk limit prev cont))) 7603 (t (funcall cont chunk))))) 7604 7605 (defun slime-inspector-next-range (chunk limit prev) 7606 (destructuring-bind (_ len start end) chunk 7607 (let ((count (- end start))) 7608 (cond ((and prev (< 0 start) (or (not limit) (< count limit))) 7609 (list (if limit (max (- end limit) 0) 0) start)) 7610 ((and (not prev) (< end len) (or (not limit) (< count limit))) 7611 (list end (if limit (+ start limit) most-positive-fixnum))) 7612 (t '(nil nil)))))) 7613 7614 (defun slime-inspector-join-chunks (chunk1 chunk2) 7615 (destructuring-bind (i1 l1 s1 e1) chunk1 7616 (destructuring-bind (i2 l2 s2 e2) chunk2 7617 (cond ((= e1 s2) 7618 (list (append i1 i2) l2 s1 e2)) 7619 ((= e2 s1) 7620 (list (append i2 i1) l2 s2 e1)) 7621 (t (error "Invalid chunks")))))) 7624 7622 7625 7623 (slime-define-keys slime-inspector-mode-map … … 8487 8485 ,(buffer-name) 8488 8486 ,0 8487 ,nil 8489 8488 ,nil)) 8490 8489 (let ((bufname (buffer-name))) … … 8525 8524 ("swank::emacs-connected" "(swank::emacs-connected )") 8526 8525 ("swank::compile-string-for-emacs" 8527 "(swank::compile-string-for-emacs string buffer position directory )")8526 "(swank::compile-string-for-emacs string buffer position directory debug)") 8528 8527 ("swank::connection.socket-io" 8529 8528 "(swank::connection.socket-io \\(struct\\(ure\\)?\\|object\\|instance\\))") … … 9092 9091 (or (/= beg 1) (/= end (1+ total)))))) 9093 9092 9094 9093 ;;;;; CL symbols vs. Elisp symbols. 9094 9095 (defun slime-cl-symbol-name (symbol) 9096 (let ((n (if (stringp symbol) symbol (symbol-name symbol)))) 9097 (if (string-match ":\\([^:]*\\)$" n) 9098 (let ((symbol-part (match-string 1 n))) 9099 (if (string-match "^|\\(.*\\)|$" symbol-part) 9100 (match-string 1 symbol-part) 9101 symbol-part)) 9102 n))) 9103 9104 (defun slime-cl-symbol-package (symbol &optional default) 9105 (let ((n (if (stringp symbol) symbol (symbol-name symbol)))) 9106 (if (string-match "^\\([^:]*\\):" n) 9107 (match-string 1 n) 9108 default))) 9109 9110 (defun slime-qualify-cl-symbol-name (symbol-or-name) 9111 "Return a package-qualified symbol-name that indicates the CL symbol 9112 SYMBOL. If SYMBOL doesn't already have a package prefix the current 9113 package is used." 9114 (let ((s (if (stringp symbol-or-name) 9115 symbol-or-name 9116 (symbol-name symbol-or-name)))) 9117 (if (slime-cl-symbol-package s) 9118 s 9119 (format "%s::%s" 9120 (let* ((package (or (slime-current-package) (slime-lisp-package)))) 9121 ;; package is a string like ":cl-user" or "CL-USER". 9122 (if (and package (string-match "^:" package)) 9123 (substring package 1) 9124 package)) 9125 (slime-cl-symbol-name s))))) 9126 9127 ;;;;; Moving, CL idiosyncracies aware (reader conditionals &c.) 9128 9129 (defmacro slime-point-moves-p (&rest body) 9130 "Execute BODY and return true if the current buffer's point moved." 9131 (let ((pointvar (gensym "point-"))) 9132 `(let ((,pointvar (point))) 9133 (save-current-buffer ,@body) 9134 (/= ,pointvar (point))))) 9135 9136 (put 'slime-point-moves-p 'lisp-indent-function 0) 9137 9138 (defun slime-forward-sexp (&optional count) 9139 "Like `forward-sexp', but understands reader-conditionals (#- and #+)." 9140 (dotimes (i (or count 1)) 9141 (while (slime-point-moves-p (slime-forward-blanks) 9142 (slime-forward-reader-comment) 9143 (slime-forward-reader-conditional))) 9144 (forward-sexp))) 9145 9146 (defun slime-forward-blanks () 9147 "Move forward over all whitespace and newlines at point." 9148 (ignore-errors 9149 (while (slime-point-moves-p 9150 (skip-syntax-forward " ") 9151 ;; newlines aren't in lisp-mode's whitespace syntax class 9152 (when (eolp) (forward-char)))))) 9153 9154 ;; Emacs 21's forward-sexp understands #| |# comments in lisp-mode 9155 ;; buffers, but (at least) Emacs 20's doesn't, so here it is. 9156 (defun slime-forward-reader-comment () 9157 "Move forward over #|...|# reader comments. The comments may be nested." 9158 (when (looking-at "#|") 9159 (goto-char (match-end 0)) 9160 (while (not (looking-at "|#")) 9161 (re-search-forward (regexp-opt '("|#" "#|"))) 9162 (goto-char (match-beginning 0)) 9163 (when (looking-at "#|") ; nested comment 9164 (slime-forward-reader-comment))) 9165 (goto-char (match-end 0)))) 9166 9167 (defun slime-forward-reader-conditional () 9168 "Move past any reader conditional (#+ or #-) at point." 9169 (when (or (looking-at "#\\+") 9170 (looking-at "#-")) 9171 (goto-char (match-end 0)) 9172 (let* ((plus-conditional-p (eq (char-before) ?+)) 9173 (result (slime-eval-feature-conditional (read (current-buffer))))) 9174 (unless (if plus-conditional-p result (not result)) 9175 ;; skip this sexp 9176 (slime-forward-sexp))))) 9177 9178 (defun slime-keywordify (symbol) 9179 "Make a keyword out of the symbol SYMBOL." 9180 (let ((name (downcase (symbol-name symbol)))) 9181 (intern (if (eq ?: (aref name 0)) 9182 name 9183 (concat ":" name))))) 9184 9185 (defun slime-eval-feature-conditional (e) 9186 "Interpret a reader conditional expression." 9187 (if (symbolp e) 9188 (memq (slime-keywordify e) (slime-lisp-features)) 9189 (funcall (ecase (slime-keywordify (car e)) 9190 (:and #'every) 9191 (:or #'some) 9192 (:not (lambda (f l) (not (apply f l))))) 9193 #'slime-eval-feature-conditional 9194 (cdr e)))) 9195 9095 9196 ;;;;; Extracting Lisp forms from the buffer or user 9096 9197 … … 9166 9267 (error "No expression at point."))) 9167 9268 9269 9168 9270 ;;;; Portability library 9169 9271 trunk/thirdparty/slime/swank-allegro.lisp
r3147 r3416 415 415 (t 416 416 (let ((defs (excl::find-source-file fspec))) 417 (when (and (null defs) 418 (listp fspec) 419 (string= (car fspec) '#:method)) 420 ;; If methods are defined in a defgeneric form, the source location is 421 ;; recorded for the gf but not for the methods. Therefore fall back to 422 ;; the gf as the likely place of definition. 423 (setq defs (excl::find-source-file (second fspec)))) 417 424 (if (null defs) 418 425 (list trunk/thirdparty/slime/swank-backend.lisp
r3147 r3416 959 959 "") 960 960 961 (definterface thread-description (thread) 962 "Return a string describing THREAD." 963 (declare (ignore thread)) 964 "") 965 966 (definterface set-thread-description (thread description) 967 "Set THREAD's description to DESCRIPTION." 968 (declare (ignore thread description)) 969 "") 970 961 971 (definterface make-lock (&key name) 962 972 "Make a lock for thread synchronization. trunk/thirdparty/slime/swank-cmucl.lisp
r3147 r3416 101 101 (defimplementation accept-connection (socket &key 102 102 external-format buffering timeout) 103 (declare (ignore timeout external-format)) 104 (let ((buffering (or buffering :full))) 105 (make-socket-io-stream (ext:accept-tcp-connection socket) buffering))) 103 (declare (ignore timeout)) 104 (make-socket-io-stream (ext:accept-tcp-connection socket) 105 (or buffering :full) 106 (or external-format :iso-8859-1))) 106 107 107 108 (defimplementation find-external-format (coding-system) … … 122 123 (car (ext:host-entry-addr-list hostent)))) 123 124 124 (defun make-socket-io-stream (fd buffering) 125 (defvar *external-format-to-coding-system* 126 '((:iso-8859-1 127 "latin-1" "latin-1-unix" "iso-latin-1-unix" 128 "iso-8859-1" "iso-8859-1-unix") 129 #+unicode 130 (:utf-8 "utf-8" "utf-8-unix"))) 131 132 (defimplementation find-external-format (coding-system) 133 (car (rassoc-if (lambda (x) (member coding-system x :test #'equal)) 134 *external-format-to-coding-system*))) 135 136 (defun make-socket-io-stream (fd buffering external-format) 125 137 "Create a new input/output fd-stream for FD." 138 #-unicode(declare (ignore external-format)) 126 139 (sys:make-fd-stream fd :input t :output t :element-type 'base-char 127 :buffering buffering)) 140 :buffering buffering 141 #+unicode :external-format 142 #+unicode external-format)) 128 143 129 144 ;;;;; Signal-driven I/O trunk/thirdparty/slime/swank-lispworks.lisp
r3147 r3416 226 226 (funcall fun)))) 227 227 228 (defimplementation install-debugger-globally (function) 229 (setq *debugger-hook* function) 230 (setf (env:environment) (slime-env function '()))) 231 228 232 (defvar *sldb-top-frame*) 229 233 trunk/thirdparty/slime/swank-sbcl.lisp
r3147 r3416 15 15 16 16 (eval-when (:compile-toplevel :load-toplevel :execute) 17 (require 'asdf)18 17 (require 'sb-bsd-sockets) 19 18 (require 'sb-introspect) … … 21 20 (require 'sb-cltl2)) 22 21 23 (declaim (optimize (debug 2) (sb-c:insert-step-conditions 0))) 22 (declaim (optimize (debug 2) 23 (sb-c::insert-step-conditions 0) 24 (sb-c::insert-debug-catch 0) 25 (sb-c::merge-tail-calls 2))) 24 26 25 27 (import-from :sb-gray *gray-stream-symbols* :swank-backend) … … 48 50 (if (find-symbol "FRAME-HAS-DEBUG-TAG-P" "SB-DEBUG") 49 51 '(:and) 50 '(:or)))) 52 '(:or))) 53 (defun sbcl-with-symbol (name package) 54 (if (find-symbol (string name) (string package)) 55 '(:and)
