From trittweiler at common-lisp.net Thu Nov 1 14:29:24 2007 From: trittweiler at common-lisp.net (trittweiler) Date: Thu, 1 Nov 2007 09:29:24 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071101142924.A612A5003B@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv24526 Modified Files: swank.lisp Log Message: 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. --- /project/slime/cvsroot/slime/swank.lisp 2007/10/22 11:33:54 1.512 +++ /project/slime/cvsroot/slime/swank.lisp 2007/11/01 14:29:23 1.513 @@ -2934,7 +2934,10 @@ (*print-readably* nil)) (multiple-value-bind (title content) (inspect-for-emacs object inspector) (list :title title - :type (to-string (type-of object)) + :string-representation + (with-output-to-string (stream) + (print-unreadable-object (object stream :type t :identity t))) + :id (assign-index object *inspectee-parts*) :content (inspector-content-for-emacs content))))) (defslimefun inspector-nth-part (index) From trittweiler at common-lisp.net Thu Nov 1 14:29:44 2007 From: trittweiler at common-lisp.net (trittweiler) Date: Thu, 1 Nov 2007 09:29:44 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071101142944.361BE5003B@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv24581 Modified Files: slime.el Log Message: 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. --- /project/slime/cvsroot/slime/slime.el 2007/09/27 12:56:40 1.875 +++ /project/slime/cvsroot/slime/slime.el 2007/11/01 14:29:43 1.876 @@ -7486,14 +7486,19 @@ (setq slime-buffer-connection (slime-current-connection)) (let ((inhibit-read-only t)) (erase-buffer) - (destructuring-bind (&key title type content) inspected-parts + (destructuring-bind (&key string-representation id title content) inspected-parts (macrolet ((fontify (face string) `(slime-inspector-fontify ,face ,string))) + (slime-propertize-region + (list 'slime-part-number id + 'mouse-face 'highlight + 'face 'slime-inspector-value-face) + (insert string-representation)) + (insert ":\n ") (insert (fontify topline title)) (while (eq (char-before) ?\n) (backward-delete-char 1)) - (insert "\n [" (fontify label "type:") " " (fontify type type) "]\n" - (fontify label "--------------------") "\n") + (insert "\n" (fontify label "--------------------") "\n") (save-excursion (mapc #'slime-inspector-insert-ispec content)) (pop-to-buffer (current-buffer)) From trittweiler at common-lisp.net Thu Nov 1 14:30:08 2007 From: trittweiler at common-lisp.net (trittweiler) Date: Thu, 1 Nov 2007 09:30:08 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071101143008.0AAB953010@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv24692 Modified Files: ChangeLog Log Message: 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. --- /project/slime/cvsroot/slime/ChangeLog 2007/10/22 11:34:04 1.1239 +++ /project/slime/cvsroot/slime/ChangeLog 2007/11/01 14:30:06 1.1240 @@ -1,3 +1,37 @@ +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): From heller at common-lisp.net Tue Nov 6 13:10:23 2007 From: heller at common-lisp.net (heller) Date: Tue, 6 Nov 2007 08:10:23 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071106131023.E9ADF1B01F@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv7736 Modified Files: ChangeLog slime.el Log Message: * slime.el (slime-events-buffer, slime-inspector-buffer): Disable undo. --- /project/slime/cvsroot/slime/ChangeLog 2007/11/01 14:30:06 1.1240 +++ /project/slime/cvsroot/slime/ChangeLog 2007/11/06 13:10:23 1.1241 @@ -1,3 +1,8 @@ +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 --- /project/slime/cvsroot/slime/slime.el 2007/11/01 14:29:43 1.876 +++ /project/slime/cvsroot/slime/slime.el 2007/11/06 13:10:23 1.877 @@ -2486,6 +2486,7 @@ (or (get-buffer slime-event-buffer-name) (let ((buffer (get-buffer-create slime-event-buffer-name))) (with-current-buffer buffer + (buffer-disable-undo) (set (make-local-variable 'outline-regexp) "^(") (set (make-local-variable 'comment-start) ";") (set (make-local-variable 'comment-end) "") @@ -7470,6 +7471,7 @@ (or (get-buffer "*Slime Inspector*") (with-current-buffer (get-buffer-create "*Slime Inspector*") (setq slime-inspector-mark-stack '()) + (buffer-disable-undo) (slime-mode t) (slime-inspector-mode) (make-local-variable 'slime-saved-window-config) From trittweiler at common-lisp.net Mon Nov 19 20:18:09 2007 From: trittweiler at common-lisp.net (trittweiler) Date: Mon, 19 Nov 2007 15:18:09 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071119201809.70CEF32027@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv4437 Modified Files: slime.el Log Message: * 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. --- /project/slime/cvsroot/slime/slime.el 2007/11/06 13:10:23 1.877 +++ /project/slime/cvsroot/slime/slime.el 2007/11/19 20:18:08 1.878 @@ -2840,6 +2840,7 @@ (slime-define-keys slime-repl-mode-map ("\C-m" 'slime-repl-return) + ([return] 'slime-repl-return) ("\C-j" 'slime-repl-newline-and-indent) ("\C-\M-m" 'slime-repl-closing-return) ([(control return)] 'slime-repl-closing-return) @@ -3565,6 +3566,7 @@ nil "[read]" '(("\C-m" . slime-repl-return) + ([return] . slime-repl-return) ("\C-c\C-b" . slime-repl-read-break) ("\C-c\C-c" . slime-repl-read-break))) @@ -4167,6 +4169,7 @@ (slime-define-keys slime-compiler-notes-mode-map ((kbd "RET") 'slime-compiler-notes-default-action-or-show-details) + ([return] 'slime-compiler-notes-default-action-or-show-details) ([mouse-2] 'slime-compiler-notes-default-action-or-show-details/mouse) ("q" 'slime-temp-buffer-quit)) @@ -5985,6 +5988,7 @@ (slime-define-keys slime-xref-mode-map ((kbd "RET") 'slime-show-xref) + ([return] 'slime-show-xref) ("\C-m" 'slime-show-xref) (" " 'slime-goto-xref) ("q" 'slime-xref-quit) @@ -6516,6 +6520,7 @@ ("v" 'sldb-show-source) ((kbd "RET") 'sldb-default-action) ("\C-m" 'sldb-default-action) + ([return] 'sldb-default-action) ([mouse-2] 'sldb-default-action/mouse) ([follow-link] 'mouse-face) ("e" 'sldb-eval-in-frame) @@ -7339,6 +7344,7 @@ (slime-define-keys slime-connection-list-mode-map ((kbd "RET") 'slime-goto-connection) + ([return] 'slime-goto-connection) ("d" 'slime-connection-list-make-default) ("g" 'slime-update-connection-list) ((kbd "C-k") 'slime-quit-connection-at-point) From trittweiler at common-lisp.net Mon Nov 19 20:18:29 2007 From: trittweiler at common-lisp.net (trittweiler) Date: Mon, 19 Nov 2007 15:18:29 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071119201829.8F360450CD@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv4498 Modified Files: ChangeLog Log Message: * 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. --- /project/slime/cvsroot/slime/ChangeLog 2007/11/06 13:10:23 1.1241 +++ /project/slime/cvsroot/slime/ChangeLog 2007/11/19 20:18:29 1.1242 @@ -1,3 +1,17 @@ +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 From heller at common-lisp.net Tue Nov 20 21:29:41 2007 From: heller at common-lisp.net (heller) Date: Tue, 20 Nov 2007 16:29:41 -0500 (EST) Subject: [slime-cvs] CVS slime/contrib Message-ID: <20071120212941.849B861061@common-lisp.net> Update of /project/slime/cvsroot/slime/contrib In directory clnet:/tmp/cvs-serv10224 Modified Files: swank-fancy-inspector.lisp Log Message: swank-fancy-inspector.lisp (inspect-for-emacs function t): Don't specialize the second argument, so that backend methods take precedence. --- /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp 2007/09/20 14:55:53 1.4 +++ /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp 2007/11/20 21:29:41 1.5 @@ -94,7 +94,7 @@ (t (list label ": " '(:newline) " " docstring '(:newline)))))) -(defmethod inspect-for-emacs ((f function) (inspector fancy-inspector)) +(defmethod inspect-for-emacs ((f function) inspector) (declare (ignore inspector)) (values "A function." (append From heller at common-lisp.net Tue Nov 20 21:30:51 2007 From: heller at common-lisp.net (heller) Date: Tue, 20 Nov 2007 16:30:51 -0500 (EST) Subject: [slime-cvs] CVS slime/contrib Message-ID: <20071120213051.7D3AE650D9@common-lisp.net> Update of /project/slime/cvsroot/slime/contrib In directory clnet:/tmp/cvs-serv10381 Modified Files: ChangeLog Log Message: *** empty log message *** --- /project/slime/cvsroot/slime/contrib/ChangeLog 2007/10/24 20:03:22 1.64 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2007/11/20 21:30:51 1.65 @@ -1,3 +1,9 @@ +2007-11-20 Helmut Eller + + * swank-fancy-inspector.lisp (inspect-for-emacs function t): Don't + specialize the second argument, so that backend methods take + precedence. Reported by Maciej Katafiasz. + 2007-10-24 Tobias C. Rittweiler * swank-arglist.lisp (decode-arglist): Fix incompatibility with From heller at common-lisp.net Thu Nov 22 22:33:39 2007 From: heller at common-lisp.net (heller) Date: Thu, 22 Nov 2007 17:33:39 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071122223339.BCA9312083@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv28749 Modified Files: swank.lisp ChangeLog Log Message: * 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. --- /project/slime/cvsroot/slime/swank.lisp 2007/11/01 14:29:23 1.513 +++ /project/slime/cvsroot/slime/swank.lisp 2007/11/22 22:33:39 1.514 @@ -2282,7 +2282,8 @@ (defslimefun swank-require (module &optional filename) "Load the module MODULE." - (require module (or filename (module-filename module))) + (unless (member (string module) *modules* :key #'string=) + (require module (or filename (module-filename module)))) nil) (defvar *find-module* 'find-module --- /project/slime/cvsroot/slime/ChangeLog 2007/11/19 20:18:29 1.1242 +++ /project/slime/cvsroot/slime/ChangeLog 2007/11/22 22:33:39 1.1243 @@ -1,3 +1,10 @@ +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), From trittweiler at common-lisp.net Fri Nov 23 08:25:52 2007 From: trittweiler at common-lisp.net (trittweiler) Date: Fri, 23 Nov 2007 03:25:52 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071123082552.69C7D731E9@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv18911 Modified Files: swank.lisp Log Message: * swank.lisp (swank-require): Fix typo (:key was used instead of :test.) Reported by Stelian Ionescu. --- /project/slime/cvsroot/slime/swank.lisp 2007/11/22 22:33:39 1.514 +++ /project/slime/cvsroot/slime/swank.lisp 2007/11/23 08:25:52 1.515 @@ -2282,7 +2282,7 @@ (defslimefun swank-require (module &optional filename) "Load the module MODULE." - (unless (member (string module) *modules* :key #'string=) + (unless (member (string module) *modules* :test #'string=) (require module (or filename (module-filename module)))) nil) From trittweiler at common-lisp.net Fri Nov 23 08:26:06 2007 From: trittweiler at common-lisp.net (trittweiler) Date: Fri, 23 Nov 2007 03:26:06 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071123082606.7F86873237@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv18996 Modified Files: ChangeLog Log Message: * swank.lisp (swank-require): Fix typo (:key was used instead of :test.) Reported by Stelian Ionescu. --- /project/slime/cvsroot/slime/ChangeLog 2007/11/22 22:33:39 1.1243 +++ /project/slime/cvsroot/slime/ChangeLog 2007/11/23 08:26:05 1.1244 @@ -1,3 +1,8 @@ +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 From trittweiler at common-lisp.net Fri Nov 23 08:26:32 2007 From: trittweiler at common-lisp.net (trittweiler) Date: Fri, 23 Nov 2007 03:26:32 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071123082632.5435F12087@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv19107 Modified Files: ChangeLog Log Message: * swank.lisp (swank-require): Fix typo (:key was used instead of :test.) Reported by Stelian Ionescu. --- /project/slime/cvsroot/slime/ChangeLog 2007/11/23 08:26:05 1.1244 +++ /project/slime/cvsroot/slime/ChangeLog 2007/11/23 08:26:31 1.1245 @@ -1,7 +1,7 @@ 2007-11-23 Tobias C. Rittweiler * swank.lisp (swank-require): Fix typo (:key was used instead of - :test.) Reported by Stelian Ionescu. + :test.) Reported by Stelian Ionescu. 2007-11-22 Helmut Eller From heller at common-lisp.net Sat Nov 24 07:58:43 2007 From: heller at common-lisp.net (heller) Date: Sat, 24 Nov 2007 02:58:43 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071124075843.92C5D7A037@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv16721 Modified Files: swank.lisp ChangeLog Log Message: * 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. --- /project/slime/cvsroot/slime/swank.lisp 2007/11/23 08:25:52 1.515 +++ /project/slime/cvsroot/slime/swank.lisp 2007/11/24 07:58:43 1.516 @@ -103,7 +103,7 @@ (*print-array* . t) (*print-lines* . 10) (*print-escape* . t) - (*print-right-margin* . 70)) + (*print-right-margin* . ,most-positive-fixnum)) "A set of printer variables used in the debugger.") (defvar *default-worker-thread-bindings* '() @@ -582,14 +582,10 @@ (coding-system *coding-system*)) "Start the server and write the listen port number to PORT-FILE. This is the entry point for Emacs." - (flet ((start-server-aux () - (setup-server 0 (lambda (port) - (announce-server-port port-file port)) - style dont-close - (find-external-format-or-lose coding-system)))) - (if (eq style :spawn) - (initialize-multiprocessing #'start-server-aux) - (start-server-aux)))) + (setup-server 0 (lambda (port) + (announce-server-port port-file port)) + style dont-close + (find-external-format-or-lose coding-system))) (defun create-server (&key (port default-server-port) (style *communication-style*) @@ -616,8 +612,11 @@ (serve-connection socket style dont-close external-format))) (ecase style (:spawn - (spawn (lambda () (loop do (ignore-errors (serve)) while dont-close)) - :name "Swank")) + (initialize-multiprocessing + (lambda () + (spawn (lambda () + (loop do (ignore-errors (serve)) while dont-close)) + :name "Swank")))) ((:fd-handler :sigio) (add-fd-handler socket (lambda () (serve)))) ((nil) (loop do (serve) while dont-close))) @@ -2017,7 +2016,7 @@ (defun safe-condition-message (condition) "Safely print condition to a string, handling any errors during printing." - (let ((*print-pretty* t)) + (let ((*print-pretty* t) (*print-right-margin* 65)) (handler-case (format-sldb-condition condition) (error (cond) @@ -2481,24 +2480,15 @@ (string< (symbol-name x) (symbol-name y)) (string< (package-name px) (package-name py))))))))) -(let ((regex-hash (make-hash-table :test #'equal))) - (defun compiled-regex (regex-string) - (or (gethash regex-string regex-hash) - (setf (gethash regex-string regex-hash) - (if (zerop (length regex-string)) - (lambda (s) (check-type s string) t) - (compile nil (slime-nregex:regex-compile regex-string))))))) - -(defun make-regexp-matcher (string case-sensitive) - (let* ((case-modifier (if case-sensitive #'string #'string-upcase)) - (regex (compiled-regex (funcall case-modifier string)))) +(defun make-apropos-matcher (pattern case-sensitive) + (let ((chr= (if case-sensitive #'char= #'char-equal))) (lambda (symbol) - (funcall regex (funcall case-modifier symbol))))) + (search pattern (string symbol) :test chr=)))) (defun apropos-symbols (string external-only case-sensitive package) (let ((packages (or package (remove (find-package :keyword) (list-all-packages)))) - (matcher (make-regexp-matcher string case-sensitive)) + (matcher (make-apropos-matcher string case-sensitive)) (result)) (with-package-iterator (next packages :external :internal) (loop (multiple-value-bind (morep symbol) (next) --- /project/slime/cvsroot/slime/ChangeLog 2007/11/23 08:26:31 1.1245 +++ /project/slime/cvsroot/slime/ChangeLog 2007/11/24 07:58:43 1.1246 @@ -1,3 +1,17 @@ +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 From heller at common-lisp.net Sat Nov 24 08:04:27 2007 From: heller at common-lisp.net (heller) Date: Sat, 24 Nov 2007 03:04:27 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071124080427.C081D1D107@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv18829 Modified Files: swank.lisp slime.el ChangeLog Log Message: * 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. --- /project/slime/cvsroot/slime/swank.lisp 2007/11/24 07:58:43 1.516 +++ /project/slime/cvsroot/slime/swank.lisp 2007/11/24 08:04:27 1.517 @@ -1628,20 +1628,10 @@ (defun parse-package (string) "Find the package named STRING. Return the package or nil." - (check-type string (or string null)) - (if (zerop (length string)) - nil - (multiple-value-bind (name pos interned?) - (let ((*package* *swank-io-package*)) - (ignore-errors (read-softly-from-string string))) - (unwind-protect - (and name - (or (symbolp name) - (stringp name)) - (= (length string) pos) - (find-package name)) - (when interned? - (unintern-in-home-package name)))))) + ;; STRING comes usually from a (in-package STRING) form. + (ignore-errors + (find-package (let ((*package* *swank-io-package*)) + (read-from-string string))))) (defun unparse-name (string) "Print the name STRING according to the current printer settings." --- /project/slime/cvsroot/slime/slime.el 2007/11/19 20:18:08 1.878 +++ /project/slime/cvsroot/slime/slime.el 2007/11/24 08:04:27 1.879 @@ -488,7 +488,7 @@ (defun slime-pretty-package-name (name) "Return a pretty version of a package name NAME." - (let ((name (cond ((string-match "^:\\(.*\\)$" name) + (let ((name (cond ((string-match "^#?:\\(.*\\)$" name) (match-string 1 name)) ((string-match "^\"\\(.*\\)\"$" name) (match-string 1 name)) @@ -2244,15 +2244,12 @@ ;; (in-package #+ansi-cl :cl #-ansi-cl 'lisp) (defun slime-search-buffer-package () (let ((case-fold-search t) - (regexp (concat "^(\\(cl:\\|common-lisp:\\)?in-package\\>[ \n\t\r']*" - "\\([^)]+\\)[ \n\t]*)"))) + (regexp (concat "^(\\(cl:\\|common-lisp:\\)?in-package\\>[ \t']*" + "\\([^)]+\\)[ \t]*)"))) (save-excursion (when (or (re-search-backward regexp nil t) (re-search-forward regexp nil t)) - (let ((string (match-string-no-properties 2))) - (cond ((string-match "^\"" string) (ignore-errors (read string))) - ((string-match "^#?:" string) (substring string (match-end 0))) - (t string))))))) + (match-string-no-properties 2))))) ;;; Synchronous requests are implemented in terms of asynchronous ;;; ones. We make an asynchronous request with a continuation function --- /project/slime/cvsroot/slime/ChangeLog 2007/11/24 07:58:43 1.1246 +++ /project/slime/cvsroot/slime/ChangeLog 2007/11/24 08:04:27 1.1247 @@ -1,5 +1,14 @@ 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. From heller at common-lisp.net Sat Nov 24 08:14:50 2007 From: heller at common-lisp.net (heller) Date: Sat, 24 Nov 2007 03:14:50 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071124081450.A7D8A2D174@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv19400 Modified Files: slime.el swank.lisp ChangeLog Log Message: 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. --- /project/slime/cvsroot/slime/slime.el 2007/11/24 08:04:27 1.879 +++ /project/slime/cvsroot/slime/slime.el 2007/11/24 08:14:50 1.880 @@ -1933,6 +1933,9 @@ "The symbol-names of Lisp's *FEATURES*. This is automatically synchronized from Lisp.") +(slime-def-connection-var slime-lisp-modules '() + "The strings of Lisp's *MODULES*.") + (slime-def-connection-var slime-lisp-package "COMMON-LISP-USER" "The current package name of the Superior lisp. @@ -2002,14 +2005,16 @@ "Initialize CONNECTION with INFO received from Lisp." (let ((slime-dispatching-connection connection)) (destructuring-bind (&key pid style lisp-implementation machine - features package version &allow-other-keys) info + features package version modules + &allow-other-keys) info (or (equal version slime-protocol-version) (yes-or-no-p "Protocol version mismatch. Continue anyway? ") (slime-net-close connection) (top-level)) (setf (slime-pid) pid (slime-communication-style) style - (slime-lisp-features) features) + (slime-lisp-features) features + (slime-lisp-modules) modules) (destructuring-bind (&key name prompt) package (setf (slime-lisp-package) name (slime-lisp-package-prompt-string) prompt)) @@ -2029,6 +2034,7 @@ (slime-generate-connection-name (symbol-name name))))) (slime-hide-inferior-lisp-buffer) (slime-init-output-buffer connection) + (slime-load-contribs) (run-hooks 'slime-connected-hook) (when-let (fun (plist-get args ':init-function)) (funcall fun))) @@ -7904,6 +7910,27 @@ (run-hook-with-args 'slime-indentation-update-hooks symbol indent)))) +;;;; Contrib modules + +(defvar slime-required-modules '()) + +(defun slime-require (module) + (assert (keywordp module)) + (pushnew module slime-required-modules) + (when (slime-connected-p) + (slime-load-contribs))) + +(defun slime-load-contribs () + (let ((needed (remove-if (lambda (s) + (member (subseq (symbol-name s) 1) + (mapcar #'downcase (slime-lisp-modules)))) + slime-required-modules))) + (when needed + (slime-eval-async `(swank:swank-require ',needed) + (lambda (new-modules) + (setf (slime-lisp-modules) new-modules)))))) + + ;;;;; Pull-down menu (defvar slime-easy-menu --- /project/slime/cvsroot/slime/swank.lisp 2007/11/24 08:04:27 1.517 +++ /project/slime/cvsroot/slime/swank.lisp 2007/11/24 08:14:50 1.518 @@ -1442,6 +1442,7 @@ :type ,(machine-type) :version ,(machine-version)) :features ,(features-for-emacs) + :modules ,*modules* :package (:name ,(package-name *package*) :prompt ,(package-string-for-prompt *package*)) :version ,*swank-wire-protocol-version*)) @@ -2269,11 +2270,12 @@ ;;;;; swank-require -(defslimefun swank-require (module &optional filename) +(defslimefun swank-require (modules &optional filename) "Load the module MODULE." - (unless (member (string module) *modules* :test #'string=) - (require module (or filename (module-filename module)))) - nil) + (dolist (module (if (listp modules) modules (list modules))) + (unless (member (string module) *modules* :test #'string=) + (require module (or filename (module-filename module))))) + *modules*) (defvar *find-module* 'find-module "Pluggable function to locate modules. --- /project/slime/cvsroot/slime/ChangeLog 2007/11/24 08:04:27 1.1247 +++ /project/slime/cvsroot/slime/ChangeLog 2007/11/24 08:14:50 1.1248 @@ -1,5 +1,17 @@ 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. From heller at common-lisp.net Sat Nov 24 08:15:20 2007 From: heller at common-lisp.net (heller) Date: Sat, 24 Nov 2007 03:15:20 -0500 (EST) Subject: [slime-cvs] CVS slime/contrib Message-ID: <20071124081520.E7AAF3F011@common-lisp.net> Update of /project/slime/cvsroot/slime/contrib In directory clnet:/tmp/cvs-serv19534 Modified Files: slime-fuzzy.el ChangeLog Log Message: * slime-fuzzy.el: Use slime-require instead of a connected-hook. --- /project/slime/cvsroot/slime/contrib/slime-fuzzy.el 2007/09/20 14:55:53 1.4 +++ /project/slime/cvsroot/slime/contrib/slime-fuzzy.el 2007/11/24 08:15:20 1.5 @@ -585,14 +585,12 @@ ;;; Initialization (defun slime-fuzzy-init () - (add-hook 'slime-connected-hook 'slime-fuzzy-on-connect) (slime-fuzzy-bind-keys)) (defun slime-fuzzy-bind-keys () (define-key slime-mode-map "\C-c\M-i" 'slime-fuzzy-complete-symbol) (define-key slime-repl-mode-map "\C-c\M-i" 'slime-fuzzy-complete-symbol)) -(defun slime-fuzzy-on-connect () - (slime-eval-async '(swank:swank-require :swank-fuzzy))) +(slime-require :swank-fuzzy) (provide 'slime-fuzzy) --- /project/slime/cvsroot/slime/contrib/ChangeLog 2007/11/20 21:30:51 1.65 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2007/11/24 08:15:20 1.66 @@ -1,3 +1,7 @@ +2007-11-24 Helmut Eller + + * slime-fuzzy.el: Use slime-require instead of a connected-hook. + 2007-11-20 Helmut Eller * swank-fancy-inspector.lisp (inspect-for-emacs function t): Don't From heller at common-lisp.net Sat Nov 24 08:19:00 2007 From: heller at common-lisp.net (heller) Date: Sat, 24 Nov 2007 03:19:00 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071124081900.248105805E@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv19730 Modified Files: swank-lispworks.lisp swank-loader.lisp ChangeLog Log Message: 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. --- /project/slime/cvsroot/slime/swank-lispworks.lisp 2007/08/23 19:03:37 1.92 +++ /project/slime/cvsroot/slime/swank-lispworks.lisp 2007/11/24 08:18:59 1.93 @@ -542,22 +542,10 @@ (defun unmangle-unfun (symbol) "Converts symbols like 'SETF::|\"CL-USER\" \"GET\"| to function names like \(SETF GET)." - (or (and (eq (symbol-package symbol) - (load-time-value (find-package :setf))) - (let ((slime-nregex::*regex-groupings* 0) - (slime-nregex::*regex-groups* (make-array 10)) - (symbol-name (symbol-name symbol))) - (and (funcall (load-time-value - (compile nil (slime-nregex:regex-compile "^\"(.+)\" \"(.+)\"$"))) - symbol-name) - (list 'setf - (intern (apply #'subseq symbol-name - (aref slime-nregex::*regex-groups* 2)) - (find-package - (apply #'subseq symbol-name - (aref slime-nregex::*regex-groups* 1)))))))) - symbol)) - + (cond ((sys::setf-symbol-p symbol) + (sys::setf-pair-from-underlying-name symbol)) + (t symbol))) + (defun signal-undefined-functions (htab &optional filename) (maphash (lambda (unfun dspecs) (dolist (dspec dspecs) --- /project/slime/cvsroot/slime/swank-loader.lisp 2007/10/22 09:34:04 1.74 +++ /project/slime/cvsroot/slime/swank-loader.lisp 2007/11/24 08:18:59 1.75 @@ -33,7 +33,7 @@ (defparameter *sysdep-files* (append - '("nregex") + '() #+cmu '("swank-source-path-parser" "swank-source-file-cache" "swank-cmucl") #+scl '("swank-source-path-parser" "swank-source-file-cache" "swank-scl") #+sbcl '("swank-source-path-parser" "swank-source-file-cache" --- /project/slime/cvsroot/slime/ChangeLog 2007/11/24 08:14:50 1.1248 +++ /project/slime/cvsroot/slime/ChangeLog 2007/11/24 08:18:59 1.1249 @@ -1,3 +1,12 @@ +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. From heller at common-lisp.net Sat Nov 24 08:19:25 2007 From: heller at common-lisp.net (heller) Date: Sat, 24 Nov 2007 03:19:25 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071124081925.E0B465832F@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv19850 Modified Files: ChangeLog Log Message: *** empty log message *** --- /project/slime/cvsroot/slime/ChangeLog 2007/11/24 08:18:59 1.1249 +++ /project/slime/cvsroot/slime/ChangeLog 2007/11/24 08:19:25 1.1250 @@ -1,4 +1,4 @@ -2007-11-24 Helmut Eller +2007-11-24 Helmut Eller Drop remaining dependencies on nregex. From heller at common-lisp.net Mon Nov 26 18:56:15 2007 From: heller at common-lisp.net (heller) Date: Mon, 26 Nov 2007 13:56:15 -0500 (EST) Subject: [slime-cvs] CVS slime/doc Message-ID: <20071126185615.5FA3E6F23D@common-lisp.net> Update of /project/slime/cvsroot/slime/doc In directory clnet:/tmp/cvs-serv2059 Modified Files: slime.texi Log Message: New chapter "Contributed Packages". Move some of the existing stuff to there. --- /project/slime/cvsroot/slime/doc/slime.texi 2007/09/17 13:44:48 1.57 +++ /project/slime/cvsroot/slime/doc/slime.texi 2007/11/26 18:56:15 1.58 @@ -1,5 +1,5 @@ \input texinfo -- at c %**start of header + at c %**start of header @setfilename slime.info @settitle The Superior Lisp Interaction Mode for Emacs @@ -7,12 +7,12 @@ @direntry * SLIME: (slime). Superior Lisp Interaction Mode for Emacs. @end direntry -- at c %**end of header + at c %**end of header @set EDITION 3.0-alpha @set SLIMEVER 3.0-alpha @c @set UPDATED @today{} - at set UPDATED @code{$Date: 2007/09/17 13:44:48 $} + at set UPDATED @code{$Date: 2007/11/26 18:56:15 $} @set TITLE SLIME User Manual @settitle @value{TITLE}, version @value{EDITION} @@ -110,14 +110,136 @@ * slime-mode:: * REPL:: * Debugger:: -* Extras:: +* Misc:: * Customization:: * Tips and Tricks:: +* Contributed Packages:: * Credits:: - at c * Index to Functions:: -* Key Index:: -* Command Index:: -* Variable Index:: +* Key Index:: +* Command Index:: +* Variable Index:: + + at detailmenu + --- The Detailed Node Listing --- + +Getting started + +* Platforms:: +* Downloading:: +* Installation:: +* Running:: +* Setup Tuning:: + +Downloading SLIME + +* CVS:: +* CVS Incantations:: + +Downloading from CVS + +* CVS Incantations:: + +Setup Tuning + +* Autoloading:: +* Multiple Lisps:: +* Loading Swank faster:: + +Using slime-mode + +* User-interface conventions:: +* Commands:: +* Semantic indentation:: +* Reader conditionals:: + +User-interface conventions + +* Temporary buffers:: +* Inferior-lisp:: +* Multithreading:: +* Key bindings:: + +Commands + +* Programming:: +* Compilation:: +* Evaluation:: +* Recovery:: +* Inspector:: +* Profiling:: +* Other:: + +Programming commands + +* Completion:: +* Indentation:: +* Documentation:: +* Cross-reference:: +* Finding definitions:: +* Macro-expansion:: +* Disassembly:: + +REPL: the ``top level'' + +* REPL commands:: +* Input Navigation:: +* Shortcuts:: + +SLDB: the SLIME debugger + +* Examining frames:: +* Restarts:: +* Frame Navigation:: +* Miscellaneous:: + +Misc + +* slime-selector:: +* slime-macroexpansion-minor-mode:: +* Multiple connections:: +* Typeout frames:: + +Customization + +* Emacs-side customization:: +* Lisp-side:: + +Emacs-side + +* Hooks:: + +Lisp-side (Swank) + +* Communication style:: +* Other configurables:: + +Tips and Tricks + +* Connecting to a remote lisp:: +* Global IO Redirection:: +* Auto-SLIME:: + +Connecting to a remote lisp + +* Setting up the lisp image:: +* Setting up Emacs:: +* Setting up pathname translations:: + +Contributed Packages + +* Loading Contribs:: +* Compound Completion:: +* Fuzzy Completion:: +* slime-autodoc-mode:: +* ASDF:: +* Banner:: +* Editing Commands:: +* Fancy Inspector:: +* Presentations:: +* inferior-slime-mode:: +* Scratch Buffer:: + + at end detailmenu @end menu @c ----------------------- @@ -281,7 +403,7 @@ @section Installation With a Lisp implementation that can be started from the command-line, -installation just requires a few lines in your @file{~/.emacs}: +installation just requires a few lines in your @file{.emacs}: @vindex inferior-lisp-program @vindex load-path @@ -333,7 +455,6 @@ * Autoloading:: * Multiple Lisps:: * Loading Swank faster:: -* Loading Contribs:: @end menu @node Autoloading @@ -353,8 +474,8 @@ The only difference compared to the basic setup is the line @code{(require 'slime-autoloads)}. It tells Emacs that the rest of - at SLIME{} should be loaded when one of the commands @kbd{M-x slime} or - at kbd{M-x slime-connect} is executed the first time. + at SLIME{} should be loaded automatically when one of the commands + at kbd{M-x slime} or @kbd{M-x slime-connect} is executed the first time. @node Multiple Lisps @subsection Multiple Lisps @@ -426,7 +547,7 @@ @example shell$ sbcl * (load ".../slime/swank-loader.lisp") -* (save-lisp-and-die "sbcl.core-with-slime") +* (save-lisp-and-die "sbcl.core-with-swank") @end example @noindent @@ -434,7 +555,7 @@ @lisp (setq slime-lisp-implementations - '((sbcl ("sbcl" "--core" "sbcl.core-with-slime") + '((sbcl ("sbcl" "--core" "sbcl.core-with-swank") :init (lambda (port-file _) (format "(swank:start-server %S)\n" port-file))))) @end lisp @@ -442,10 +563,6 @@ @noindent Similar setups should also work for other Lisp implementations. - at node Loading Contribs - at subsection Loading Contribs -... to be written ... - @node slime-mode @chapter Using slime-mode @@ -455,7 +572,6 @@ @menu * User-interface conventions:: -* Key bindings:: * Commands:: * Semantic indentation:: * Reader conditionals:: @@ -473,6 +589,7 @@ * Temporary buffers:: * Inferior-lisp:: * Multithreading:: +* Key bindings:: @end menu @c ----------------------- @@ -544,9 +661,27 @@ swank:*default-worker-thread-bindings*). @end example - at c ----------------------- + @node Key bindings - at section Key bindings + at subsection Key bindings + +In general we try to make our key bindings fit with the overall Emacs +style. We also have the following somewhat unusual convention of our +own: when entering a three-key sequence, the final key can be pressed +either with control or unmodified. For example, the + at code{slime-describe-symbol} command is bound to @kbd{C-c C-d d}, but +it also works to type @kbd{C-c C-d C-d}. We're simply binding both key +sequences because some people like to hold control for all three keys +and others don't, and with the two-key prefix we're not afraid of +running out of keys. + +There is one exception to this rule, just to trip you up. We never +bind @kbd{C-h} anywhere in a key sequence, so @kbd{C-c C-d C-h} +doesn't do the same thing as @kbd{C-c C-d h}. This is because Emacs +has a built-in default so that typing a prefix followed by @kbd{C-h} +will display all bindings starting with that prefix, so @kbd{C-c C-d +C-h} will actually list the bindings for all documentation commands. +This feature is just a bit too useful to clobber! @quotation @i{``Are you deliberately spiting Emacs's brilliant online help facilities? The gods will be angry!''} @@ -570,7 +705,6 @@ @kbdanchorc{C-h l, view-lossage, ``Woah at comma{} what key chord did I just do?''} Shows you the literal sequence of keys you've pressed in order. - @c is breaks links PDF, despite that it's not l it's C-h @c @kbdanchorc{ l, , ``What starts with?''} @c Lists all keybindings that begin with @code{} for the focus buffer mode. @@ -591,24 +725,6 @@ @noindent In this situation everywhere you see @kbd{C-h} in the documentation you would substitute @kbd{F1}. -In general we try to make our key bindings fit with the overall Emacs -style. We also have the following somewhat unusual convention of our -own: when entering a three-key sequence, the final key can be pressed -either with control or unmodified. For example, the - at code{slime-describe-symbol} command is bound to @kbd{C-c C-d d}, but -it also works to type @kbd{C-c C-d C-d}. We're simply binding both key -sequences because some people like to hold control for all three keys -and others don't, and with the two-key prefix we're not afraid of -running out of keys. - -There is one exception to this rule, just to trip you up. We never -bind @kbd{C-h} anywhere in a key sequence, so @kbd{C-c C-d C-h} -doesn't do the same thing as @kbd{C-c C-d h}. This is because Emacs -has a built-in default so that typing a prefix followed by @kbd{C-h} -will display all bindings starting with that prefix, so @kbd{C-c C-d -C-h} will actually list the bindings for all documentation commands. -This feature is just a bit too useful to clobber! - You can assign or change default key bindings globally using the @code{global-set-key} function in your @file{~/.emacs} file like this: @example @@ -659,7 +775,6 @@ @menu * Completion:: -* Closure:: * Indentation:: * Documentation:: * Cross-reference:: @@ -683,89 +798,15 @@ @itemx C-c C-i @itemx C-M-i Complete the symbol at point. Note that three styles of completion are -available in @SLIME{}, and the default differs from normal Emacs +available in @SLIME{}; the default is similar to normal Emacs completion (@pxref{slime-complete-symbol-function}). - at kbditem{C-c C-s, slime-complete-form} -Looks up and inserts into the current buffer the argument list for the -function at point, if there is one. More generally, the command -completes an incomplete form with a template for the missing arguments. -There is special code for discovering extra keywords of generic -functions and for handling @code{make-instance} and - at code{defmethod}. Examples: - - at example -(subseq "abc" - --inserts--> start [end]) -(find 17 - --inserts--> sequence :from-end from-end :test test - :test-not test-not :start start :end end - :key key) -(find 17 '(17 18 19) :test #'= - --inserts--> :from-end from-end - :test-not test-not :start start :end end - :key key) -(defclass foo () ((bar :initarg :bar))) -(defmethod print-object - --inserts--> (object stream) - body...) -(defmethod initialize-instance :after ((object foo) &key blub)) -(make-instance 'foo - --inserts--> :bar bar :blub blub initargs...) - at end example - - at anchor{slime-fuzzy-complete-symbol} - at kbditem{C-c M-i, slime-fuzzy-complete-symbol} -Presents a list of likely completions to choose from for an -abbreviation at point. This is a third completion method and it is -very different from the more traditional completion to which - at command{slime-complete-symbol} defaults. It attempts to complete a -symbol all at once, instead of in pieces. For example, ``mvb'' will -find ``@code{multiple-value-bind}'' and ``norm-df'' will find -``@code{least-positive-normalized-double-float}''. This can also be -selected as the method of completion used for - at code{slime-complete-symbol}. - - at cmditem{slime-fuzzy-completions-mode} - at cmditem{slime-fuzzy-abort} - at end table - - - at c ----------------------- - at node Closure - at subsubsection Closure commands - -Closure commands are used to fill in missing parenthesis. - - at table @kbd - at kbditem{C-c C-q, slime-close-parens-at-point} -Closes parentheses at point to complete the top-level-form by inserting ')' -characters at until @code{beginning-of-defun} and @code{end-of-defun} -execute without errors, or @code{slime-close-parens-limit} is exceeded. - - at kbditem{C-], slime-close-all-sexp} -Balance parentheses of open s-expressions at point. -Insert enough right-parentheses to balance unmatched left-parentheses. -Delete extra left-parentheses. Reformat trailing parentheses -Lisp-stylishly. - -If @code{REGION} is true, operate on the region. Otherwise operate on -the top-level sexp before point. @end table - - at c ----------------------- @node Indentation @subsubsection Indentation commands @table @kbd - at kbditem{C-c M-q, slime-reindent-defun} -Re-indents the current defun, or refills the current paragraph. -If point is inside a comment block, the text around point will be -treated as a paragraph and will be filled with @code{fill-paragraph}. -Otherwise, it will be treated as Lisp code, and the current defun -will be reindented. If the current defun has unbalanced parens, -an attempt will be made to fix it before reindenting. @kbditem{C-M-q, indent-sexp} [715 lines skipped] From heller at common-lisp.net Mon Nov 26 23:11:38 2007 From: heller at common-lisp.net (heller) Date: Mon, 26 Nov 2007 18:11:38 -0500 (EST) Subject: [slime-cvs] CVS slime/doc Message-ID: <20071126231138.1184374016@common-lisp.net> Update of /project/slime/cvsroot/slime/doc In directory clnet:/tmp/cvs-serv7235 Modified Files: slime.texi Log Message: Add TRAMP, highlight-edits, and typeout-frame sections. Introduce stepping section. --- /project/slime/cvsroot/slime/doc/slime.texi 2007/11/26 18:56:15 1.58 +++ /project/slime/cvsroot/slime/doc/slime.texi 2007/11/26 23:11:37 1.59 @@ -12,7 +12,7 @@ @set EDITION 3.0-alpha @set SLIMEVER 3.0-alpha @c @set UPDATED @today{} - at set UPDATED @code{$Date: 2007/11/26 18:56:15 $} + at set UPDATED @code{$Date: 2007/11/26 23:11:37 $} @set TITLE SLIME User Manual @settitle @value{TITLE}, version @value{EDITION} @@ -90,6 +90,9 @@ @xref{\name\}. @end macro + at synindex cp vr + + @c @setchapternewpage off @c @shortcontents @contents @@ -190,6 +193,7 @@ * Examining frames:: * Restarts:: * Frame Navigation:: +* Stepping:: * Miscellaneous:: Misc @@ -197,7 +201,6 @@ * slime-selector:: * slime-macroexpansion-minor-mode:: * Multiple connections:: -* Typeout frames:: Customization @@ -236,6 +239,9 @@ * Editing Commands:: * Fancy Inspector:: * Presentations:: +* Typeout frames:: +* TRAMP:: +* Highlight Edits:: * inferior-slime-mode:: * Scratch Buffer:: @@ -787,6 +793,9 @@ @node Completion @subsubsection Completion commands + at cindex Completion + at cindex Symbol Completion + Completion commands are used to complete a symbol or form based on what is already present at point. Classical completion assumes an exact prefix and gives choices only where branches may occur. Fuzzy @@ -868,6 +877,9 @@ @node Cross-reference @subsubsection Cross-reference commands + at cindex xref + at cindex Cross-referencing + @SLIME{}'s cross-reference commands are based on the support provided by the Lisp system, which varies widely between Lisps. For systems with no built-in @acronym{XREF} support @SLIME{} queries a portable @@ -924,6 +936,9 @@ @node Finding definitions @subsubsection Finding definitions (``Meta-Point'' commands). + at cindex Meta-dot + at cindex TAGS + The familiar @kbd{M-.} command is provided. For generic functions this command finds all methods, and with some systems it does other fancy things (like tracing structure accessors to their @code{DEFSTRUCT} @@ -959,6 +974,8 @@ @node Macro-expansion @subsubsection Macro-expansion commands + at cindex Macros + @table @kbd @kbditem{C-c C-m, slime-macroexpand-1} Macroexpand the expression at point once. If invoked with a prefix @@ -1002,6 +1019,8 @@ @node Compilation @subsection Compilation commands + at cindex Compilation + @SLIME{} has fancy commands for compiling functions, files, and packages. The fancy part is that notes and warnings offered by the Lisp compiler are intercepted and annotated directly onto the @@ -1261,6 +1280,8 @@ @node REPL @chapter REPL: the ``top level'' + at cindex Listener + @SLIME{} uses a custom Read-Eval-Print Loop (@REPL{}, also known as a ``top level'', or listener). The @REPL{} user-interface is written in Emacs Lisp, which gives more Emacs-integration than the traditional @@ -1325,6 +1346,8 @@ @node Input Navigation @section Input navigation + at cindex Input History + The input navigation (a.k.a. history) commands are modelled after @code{coming}-mode. Be careful if you are used to Bash-like keybindings: @kbd{M-p} and @kbd{M-n} use the current input as search @@ -1369,6 +1392,8 @@ @node Shortcuts @section Shortcuts + at cindex Shortcuts + ``Shortcuts'' are a special set of @REPL{} commands that are invoked by name. To invoke a shortcut you first press @kbd{,} (comma) at the @REPL{} prompt and then enter the shortcut's name when prompted. @@ -1430,6 +1455,8 @@ @node Debugger @chapter SLDB: the SLIME debugger + at cindex Debugger + @SLIME{} has a custom Emacs-based debugger called @SLDB{}. Conditions signalled in the Lisp system invoke @SLDB{} in Emacs by way of the Lisp @code{*DEBUGGER-HOOK*}. @@ -1443,6 +1470,7 @@ * Examining frames:: * Restarts:: * Frame Navigation:: +* Stepping:: * Miscellaneous:: @end menu @@ -1513,7 +1541,29 @@ only. @end table - at c ----------------------- + at node Stepping + at section Stepping + + at cindex Stepping + +Stepping is not available in all implementations and works very +differently in those in which it is available. + + at table @kbd + at kbditem{s, sldb-step} +Step to the next expression in the frame. For CMUCL that means, set a +breakpoint at all those code locations in the current code block which +are reachable from the current code location. + + at kbditem{x, sldb-next} +[Step to the next form in the current function.] + + at kbditem{o, sldb-next} +[Stop single-stepping temporarily, but resume it once the current +function returns.] + + at end table + @node Miscellaneous @section Miscellaneous Commands @@ -1527,15 +1577,12 @@ Return from the frame with a value entered in the minibuffer. (This command is not available in all implementations.) - at kbditem{s, sldb-step} -Step to the next expression in the frame. (This command is not -available in all implementations.) @kbditem{B, sldb-break-with-default-debugger} Exit @SLDB{} and debug the condition using the Lisp system's default debugger. - at kbditem{C-c :, slime-interactive-eval} + at kbditem{:, slime-interactive-eval} Evaluate an expression entered in the minibuffer. @end table @@ -1548,7 +1595,6 @@ * slime-selector:: * slime-macroexpansion-minor-mode:: * Multiple connections:: -* Typeout frames:: @end menu @c ----------------------- @@ -1681,32 +1727,6 @@ @end table - at c ----------------------- - at node Typeout frames - at section Typeout frames - -A ``typeout frame'' is a special Emacs frame which is used instead of -the echo area (minibuffer) to display messages from @SLIME{} commands. -This is an optional feature. The advantage of a typeout frame over the -echo area is that it can hold more text, it can be scrolled, and its -contents don't disappear when you press a key. All potentially long -messages are sent to the typeout frame, such as argument lists, macro -expansions, and so on. - - at table @kbd - at cmditem{slime-ensure-typeout-frame} -Ensure that a typeout frame exists, creating one if necessary. - at end table - -If the typeout frame is closed then the echo area will be used again -as usual. - -To have a typeout frame created automatically at startup you can add -the @code{slime-connected-hook} to your @file{~/.emacs} file: - - at example -(add-hook 'slime-connected-hook 'slime-ensure-typeout-frame) - at end example @c ----------------------- @node Customization @@ -1739,15 +1759,11 @@ @item slime-complete-symbol-function The function to use for completion of Lisp symbols. Three completion styles are available: @code{slime-simple-complete-symbol}, - at code{slime-complete-symbol*},and @code{slime-fuzzy-complete-symbol}. + at code{slime-complete-symbol*} (@pxref{Compound Completion}), +and @code{slime-fuzzy-complete-symbol} (@pxref{Fuzzy Completion}). - -An alternative is @code{slime-simple-complete-symbol}, which -completes in the usual Emacs way. Finally, there is - at code{slime-fuzzy-complete-symbol}, which is quite different from both -of the above and tries to find best matches to an abbreviated symbol. -It also has its own key binding, defaulting to @kbd{C-c M-i}. - at xref{slime-fuzzy-complete-symbol}, for more information. +The default is @code{slime-simple-complete-symbol}, which completes in +the usual Emacs way. @vindex slime-filename-translations @item slime-filename-translations @@ -1758,6 +1774,11 @@ file sharing. @vindex slime-net-coding-system + at cindex Unicode + at cindex utf8 + at cindex utf-8 + at cindex ascii + at cindex latin @item slime-net-coding-system If you want to transmit Unicode characters between Emacs and the Lisp system, you should customize this variable. E.g., if you use SBCL, you @@ -2091,7 +2112,8 @@ @file{/opt/project/source.lisp} refers to the same file on both machines. Unfortunetly NFS is usually slow, often buggy, and not always feasable, fortunetely we have an ssh connection and Emacs' - at code{tramp-mode} can do the rest. + at code{tramp-mode} can do the rest. +(See @inforef{Top, TRAMP User Manual,tramp}.) What we do is teach Emacs how to take a filename on the remote machine and translate it into something that tramp can understand and access @@ -2163,6 +2185,9 @@ * Editing Commands:: * Fancy Inspector:: * Presentations:: +* Typeout frames:: +* TRAMP:: +* Highlight Edits:: * inferior-slime-mode:: * Scratch Buffer:: @end menu @@ -2170,6 +2195,10 @@ @node Loading Contribs @section Loading Contrib Packages + at cindex Contribs + at cindex Contributions + at cindex Plugins + Contrib packages aren't loaded by default. You have to modify your setup a bit so that Emacs knows where to find them and which of them to load, i.e. you should add the contrib directory to @@ -2190,6 +2219,7 @@ @node Compound Completion @section Compund Completion + at anchor{slime-complete-symbol*} The package @code{slime-c-p-c} provides a different symbol completion algorithm, which performs completion ``in parallel'' over the hyphen-delimited sub-words of a symbol name. @@ -2397,6 +2427,8 @@ @node Fancy Inspector @section Fancy Inspector + at cindex Methods + An alternative to default inspector is provided by the package `slime-fancy-inspector'. This inspector knows a lot about CLOS objects and methods. It provides many ``actions'' that can be @@ -2410,6 +2442,8 @@ @node Presentations @section Presentations + at cindex Presentations + A ``presentation''@footnote{Presentations are a feature originating from the Lisp machines. It was possible to define @code{present} methods specialized to various devices, e.g. to draw an object to @@ -2439,6 +2473,56 @@ @cmditem{slime-clear-presentations} @end table + at node Typeout frames + at section Typeout frames + + at cindex Typeout Frame + +A ``typeout frame'' is a special Emacs frame which is used instead of +the echo area (minibuffer) to display messages from @SLIME{} commands. +This is an optional feature. The advantage of a typeout frame over the +echo area is that it can hold more text, it can be scrolled, and its +contents don't disappear when you press a key. All potentially long +messages are sent to the typeout frame, such as argument lists, macro +expansions, and so on. + + at table @kbd + at cmditem{slime-ensure-typeout-frame} +Ensure that a typeout frame exists, creating one if necessary. + at end table + +If the typeout frame is closed then the echo area will be used again +as usual. + +To have a typeout frame created automatically at startup you should +load the @code{slime-typeout-frame} package. (@pxref{Loading Contribs}.) + +The variable @code{slime-typeout-frame-properties} specifies the +height and possibly other properties of the frame. Its value is +passed to @code{make-frame}. (@inforef{Creating Frames, ,elisp}.) + + at node TRAMP + at section TRAMP + + at cindex TRAMP + +The package @code{slime-tramp} provides some functions to set up +filename translations for TRAMP. (@pxref{Setting up pathname +translations}) + + at node Highlight Edits + at section Highlight Edits + + at code{slime-highlight-edits} is a minor mode to highlight those +regions in a Lisp source file which are modified. This is useful to +quickly find those functions which need to be recompiled (whith + at kbd{C-c C-c}) + + at table @kbd + at cmditem{slime-highlight-edits-mode} +Turns @code{slime-highlight-edits-mode} on or off. + at end table + @node inferior-slime-mode @section @code{inferior-slime-mode} @@ -2465,10 +2549,10 @@ @section Scratch Buffer @anchor{slime-scratch} -The @SLIME{} scratch buffer works, contrib package - at code{slime-scratch}, imitates Emacs' own @code{*scratch*} buffer. -It's just like any other Lisp buffer, except the key binding for - at kbd{C-j}. + +The @SLIME{} scratch buffer, in contrib package @code{slime-scratch}, +imitates Emacs' usual @code{*scratch*} buffer. It's just like any +other Lisp buffer, except for the command bound to @kbd{C-j}. @table @kbd @@ -2817,7 +2901,7 @@ @printindex fn @node Variable Index - at unnumbered Variable Index + at unnumbered Variable and Concept Index @printindex vr @bye From heller at common-lisp.net Tue Nov 27 09:12:32 2007 From: heller at common-lisp.net (heller) Date: Tue, 27 Nov 2007 04:12:32 -0500 (EST) Subject: [slime-cvs] CVS slime/doc Message-ID: <20071127091232.6C83912091@common-lisp.net> Update of /project/slime/cvsroot/slime/doc In directory clnet:/tmp/cvs-serv15889 Modified Files: slime.texi Log Message: Fix some typos. --- /project/slime/cvsroot/slime/doc/slime.texi 2007/11/26 23:11:37 1.59 +++ /project/slime/cvsroot/slime/doc/slime.texi 2007/11/27 09:12:32 1.60 @@ -12,7 +12,7 @@ @set EDITION 3.0-alpha @set SLIMEVER 3.0-alpha @c @set UPDATED @today{} - at set UPDATED @code{$Date: 2007/11/26 23:11:37 $} + at set UPDATED @code{$Date: 2007/11/27 09:12:32 $} @set TITLE SLIME User Manual @settitle @value{TITLE}, version @value{EDITION} @@ -37,6 +37,7 @@ @end titlepage + at c Macros @macro SLIME @acronym{SLIME} @@ -90,6 +91,7 @@ @xref{\name\}. @end macro + at c Merge the variable and concept indices because both are rather short @synindex cp vr @@ -518,10 +520,18 @@ @item PROGRAM-ARGS is a list of command line arguments. @item CODING-SYSTEM -the coding system for the connection. +the coding system for the connection. (@pxref{slime-net-coding-system}) @item INIT - at itemx INIT-FUNCTION - ... to be written ... +should be a function which takes two arguments: a filename and a +character encoding. The function should return a Lisp expression as a +string which instructs Lisp to start the Swank server and to write the +port number to the file. At startup, @SLIME{} starts the Lisp process +and sends the result of this function to Lisp's standard input. As +default, @code{slime-init-command} is used. An example is shown in + at ref{init-example,,Loading Swank faster}. + at itemx INIT-FUNCTION +should be a function which takes no arguments. It is called after +the connection is established. (See also @ref{slime-connected-hook}.) @end table @node Loading Swank faster @@ -559,6 +569,7 @@ @noindent Then add this to your @file{.emacs}: + at anchor{init-example} @lisp (setq slime-lisp-implementations '((sbcl ("sbcl" "--core" "sbcl.core-with-swank") @@ -1028,9 +1039,9 @@ see what this means.) @table @kbd + at cindex Compiling Functions @kbditem{C-c C-c, slime-compile-defun} Compile the top-level form at point. - at cindex compiling functions @kbditem{C-c C-y, slime-call-defun} Insert a call to the function defined around point into the REPL. @@ -1773,12 +1784,13 @@ but have different layouts, as is the case with @acronym{SMB}-based file sharing. + at anchor{slime-net-coding-system} @vindex slime-net-coding-system @cindex Unicode - at cindex utf8 - at cindex utf-8 - at cindex ascii - at cindex latin + at cindex UTF-8 + at cindex ASCII + at cindex LATIN-1 + at cindex Character Encoding @item slime-net-coding-system If you want to transmit Unicode characters between Emacs and the Lisp system, you should customize this variable. E.g., if you use SBCL, you @@ -1786,11 +1798,12 @@ @example (setq slime-net-coding-system 'utf-8-unix) @end example -To actually display Unicode characters you also need appropriate fonts, -otherwise the characters will be rendered as hollow boxes. If you are -using Allegro CL and GNU Emacs, you can also use @code{emacs-mule-unix} -as coding system. GNU Emacs has often nicer fonts for the latter -encoding. +To actually display Unicode characters you also need appropriate +fonts, otherwise the characters will be rendered as hollow boxes. If +you are using Allegro CL and GNU Emacs, you can also +use @code{emacs-mule-unix} as coding system. GNU Emacs has often +nicer fonts for the latter encoding. (Different encodings can be used +for different Lisps, see @ref{Multiple Lisps}.) @end table @@ -1811,6 +1824,7 @@ buffers. An example use is to enable @code{slime-autodoc-mode} (@pxref{slime-autodoc-mode}). + at anchor{slime-connected-hook} @vindex slime-connected-hook @item slime-connected-hook This hook is run when @SLIME{} establishes a connection to a Lisp @@ -2351,7 +2365,7 @@ @section ASDF @acronym{ASDF} is a popular ``system construction tool''. The package - at code{slime-asdf} provides some commands for to load and compile such + at code{slime-asdf} provides some commands to load and compile such systems from Emacs. @acronym{ASDF} itself is not included with @SLIME{}; you have to load that yourself into your Lisp. In particular, you must load @acronym{ASDF} before you connect, otherwise @@ -2360,7 +2374,7 @@ @table @kbd @cmditem{slime-load-system NAME} Compile and load an ASDF system. The default system name is taken -from the first file matching *.asd in the working directory +from the first file matching *.asd in the current directory. @end table The package also installs some new REPL shortcuts (@pxref{Shortcuts}): @@ -2549,7 +2563,6 @@ @section Scratch Buffer @anchor{slime-scratch} - The @SLIME{} scratch buffer, in contrib package @code{slime-scratch}, imitates Emacs' usual @code{*scratch*} buffer. It's just like any other Lisp buffer, except for the command bound to @kbd{C-j}. From heller at common-lisp.net Tue Nov 27 11:50:13 2007 From: heller at common-lisp.net (heller) Date: Tue, 27 Nov 2007 06:50:13 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071127115013.F408C2105B@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv13301 Modified Files: NEWS Log Message: Write entries for 2.0. --- /project/slime/cvsroot/slime/NEWS 2005/03/27 19:41:17 1.8 +++ /project/slime/cvsroot/slime/NEWS 2007/11/27 11:50:13 1.9 @@ -1,4 +1,53 @@ -* SLIME News -*- outline -*- +* SLIME News -*- outline -*- + +* 3.0 (not released yet) + +** Removed Features +Some of the more esoteric features, like presentations or fuzzy +completion, are no longer enabled by default. A new directory +"contrib/" contains the code for these packages. To use them, you +must make some changes to your ~/.emacs. For details see, section +"Contributed Packages" in the manual. + +** Stepper +Juho Snellman implemented stepping commands for SBCL. + +** Completions +SLIME can now complete keywords and character names (like #\newline). + +* 2.0 (April 2006) + +** In-place macro expansion +Marco Baringer wrote a new minor mode to incrementally expand macros. + +** Improved arglist display +SLIME now recognizes `make-instance' calls and displays the correct +arglist if the classname is present. Similarly, for `defmethod' forms +SLIME displays the arguments of the generic function. + +** Persistent REPL history +SLIME now saves the command history from REPL buffers in a file and +reloads it for newly created REPL buffers. + +** Scieneer Common Lisp +Douglas Crosher added support for Scieneer Common Lisp. + +** SBCL +Various improvements to make SLIME work well with current SBCL versions. + +** Corman Common Lisp +Espen Wiborg added support for Corman Common Lisp. + +** Presentations +A new feature which associates objects in Lisp with their textual +represetation in Emacs. The text is clickable and operations on the +associated object can be invoked from a pop-up menu. + +** Security +SLIME has now a simple authentication mechanism: if the file +~/.slime-secret exists we verify that Emacs and Lisp can access it. +Since both parties have access to the same file system, we assume that +we can trust each other. * 1.2 (March 2005) From heller at common-lisp.net Tue Nov 27 13:16:52 2007 From: heller at common-lisp.net (heller) Date: Tue, 27 Nov 2007 08:16:52 -0500 (EST) Subject: [slime-cvs] CVS slime/doc Message-ID: <20071127131652.9F8E24C010@common-lisp.net> Update of /project/slime/cvsroot/slime/doc In directory clnet:/tmp/cvs-serv1986 Modified Files: slime.texi Log Message: Add minimal descriptions for slime-references, slime-xref-browser, and slime-fancy. --- /project/slime/cvsroot/slime/doc/slime.texi 2007/11/27 09:12:32 1.60 +++ /project/slime/cvsroot/slime/doc/slime.texi 2007/11/27 13:16:52 1.61 @@ -12,7 +12,7 @@ @set EDITION 3.0-alpha @set SLIMEVER 3.0-alpha @c @set UPDATED @today{} - at set UPDATED @code{$Date: 2007/11/27 09:12:32 $} + at set UPDATED @code{$Date: 2007/11/27 13:16:52 $} @set TITLE SLIME User Manual @settitle @value{TITLE}, version @value{EDITION} @@ -243,9 +243,12 @@ * Presentations:: * Typeout frames:: * TRAMP:: +* Documentation Links:: +* Xref and Class Browser:: * Highlight Edits:: * inferior-slime-mode:: * Scratch Buffer:: +* slime-fancy:: @end detailmenu @end menu @@ -2201,9 +2204,12 @@ * Presentations:: * Typeout frames:: * TRAMP:: +* Documentation Links:: +* Xref and Class Browser:: * Highlight Edits:: * inferior-slime-mode:: * Scratch Buffer:: +* slime-fancy:: @end menu @node Loading Contribs @@ -2524,6 +2530,33 @@ filename translations for TRAMP. (@pxref{Setting up pathname translations}) + at node Documentation Links + at section Documentation Links + +For certain error messages, SBCL includes references to the ANSI +Standard or the SBCL User Manual. The @code{slime-references} package +turns those references into clickable links. This makes finding the +referenced section of the HyperSpec much easier. + + at node Xref and Class Browser + at section Xref and Class Browser + +A rudimentary class browser is provied by +the @code{slime-xref-browser} package. + + at table @kbd + at cmditem{slime-browse-classes} +This command asks for a class name and displays inheritance tree of +for the class. + + at cmditem{slime-browse-xrefs} +This command prompts for a symbol and the kind of cross reference, +e.g. callers. The cross reference tree rooted at the symbol is then +then displayed. + + at end table + + @node Highlight Edits @section Highlight Edits @@ -2580,6 +2613,12 @@ @end table + at node slime-fancy + at section Meta package: @code{slime-fancy} + + at code{slime-fancy} is a meta package which loads a combination of the +most popular packages. + @c ----------------------- @node Credits @chapter Credits From trittweiler at common-lisp.net Tue Nov 27 16:19:38 2007 From: trittweiler at common-lisp.net (trittweiler) Date: Tue, 27 Nov 2007 11:19:38 -0500 (EST) Subject: [slime-cvs] CVS slime/contrib Message-ID: <20071127161938.EA2A64C010@common-lisp.net> Update of /project/slime/cvsroot/slime/contrib In directory clnet:/tmp/cvs-serv1810/contrib Modified Files: swank-arglists.lisp Log Message: * swank-arglists (print-arglist): Print initforms in &optional and &key lambda list specifiers as if by PRIN1 instead of PRINC. Reported by Michael Weber. --- /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2007/10/24 20:03:14 1.12 +++ /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2007/11/27 16:19:38 1.13 @@ -283,6 +283,7 @@ ;;; (DECLARE (OPTIMIZE &ANY (compilation-speed 1) (safety 1) ...)) ;;; +;; FIXME: This really ought to be rewritten. (defun print-arglist (arglist &key operator highlight) (let ((index 0) (need-space nil)) @@ -290,26 +291,27 @@ (typecase arg (arglist ; destructuring pattern (print-arglist arg)) - (optional-arg - (princ (encode-optional-arg arg))) + (optional-arg + (destructuring-bind (var &optional (initform nil initform-p)) + (encode-optional-arg arg) + (pprint-logical-block (nil nil :prefix "(" :suffix ")") + (format t "~A~:[~; ~S~]" var initform-p initform)))) (keyword-arg (let ((enc-arg (encode-keyword-arg arg))) (etypecase enc-arg (symbol (princ enc-arg)) - ((cons symbol) - (pprint-logical-block (nil nil :prefix "(" :suffix ")") - (princ (car enc-arg)) - (write-char #\space) - (pprint-fill *standard-output* (cdr enc-arg) nil))) + ((cons symbol) + (destructuring-bind (keyarg initform) enc-arg + (pprint-logical-block (nil nil :prefix "(" :suffix ")") + (format t "~A ~S" keyarg initform)))) ((cons cons) - (pprint-logical-block (nil nil :prefix "(" :suffix ")") - (pprint-logical-block (nil nil :prefix "(" :suffix ")") - (prin1 (caar enc-arg)) - (write-char #\space) - (print-arg (keyword-arg.arg-name arg))) - (unless (null (cdr enc-arg)) - (write-char #\space)) - (pprint-fill *standard-output* (cdr enc-arg) nil)))))) + (destructuring-bind ((keyword-name var) &optional (initform nil initform-p)) + enc-arg + (pprint-logical-block (nil nil :prefix "(" :suffix ")") + (pprint-logical-block (nil nil :prefix "(" :suffix ")") + (format t "~S ~A" keyword-name var)) + (when initform-p + (format t " ~S" initform)))))))) (t ; required formal or provided actual arg (if (keywordp arg) (prin1 arg) ; for &ANY args. From trittweiler at common-lisp.net Tue Nov 27 16:20:12 2007 From: trittweiler at common-lisp.net (trittweiler) Date: Tue, 27 Nov 2007 11:20:12 -0500 (EST) Subject: [slime-cvs] CVS slime/contrib Message-ID: <20071127162012.656685B0A1@common-lisp.net> Update of /project/slime/cvsroot/slime/contrib In directory clnet:/tmp/cvs-serv2385/contrib Modified Files: ChangeLog Log Message: * swank-arglists (print-arglist): Print initforms in &optional and &key lambda list specifiers as if by PRIN1 instead of PRINC. Reported by Michael Weber. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2007/11/24 08:15:20 1.66 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2007/11/27 16:20:12 1.67 @@ -1,3 +1,9 @@ +2007-11-27 Tobias C. Rittweiler + + * swank-arglists (print-arglist): Print initforms in &optional and + &key lambda list specifiers as if by PRIN1 instead of PRINC. + Reported by Michael Weber. + 2007-11-24 Helmut Eller * slime-fuzzy.el: Use slime-require instead of a connected-hook. From trittweiler at common-lisp.net Tue Nov 27 17:27:12 2007 From: trittweiler at common-lisp.net (trittweiler) Date: Tue, 27 Nov 2007 12:27:12 -0500 (EST) Subject: [slime-cvs] CVS slime/contrib Message-ID: <20071127172712.DB5431600F@common-lisp.net> Update of /project/slime/cvsroot/slime/contrib In directory clnet:/tmp/cvs-serv18615 Modified Files: swank-arglists.lisp Log Message: * swank-arglists (print-arglist): Print initforms in &optional and &key lambda list specifiers as if by PRIN1 instead of PRINC. Reported by Michael Weber. --- /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2007/11/27 16:19:38 1.13 +++ /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2007/11/27 17:27:12 1.14 @@ -292,10 +292,12 @@ (arglist ; destructuring pattern (print-arglist arg)) (optional-arg - (destructuring-bind (var &optional (initform nil initform-p)) - (encode-optional-arg arg) - (pprint-logical-block (nil nil :prefix "(" :suffix ")") - (format t "~A~:[~; ~S~]" var initform-p initform)))) + (let ((enc-arg (encode-optional-arg arg))) + (if (symbolp enc-arg) + (princ enc-arg) + (destructuring-bind (var &optional (initform nil initform-p)) enc-arg + (pprint-logical-block (nil nil :prefix "(" :suffix ")") + (format t "~A~:[~; ~S~]" var initform-p initform)))))) (keyword-arg (let ((enc-arg (encode-keyword-arg arg))) (etypecase enc-arg From heller at common-lisp.net Thu Nov 29 12:26:40 2007 From: heller at common-lisp.net (heller) Date: Thu, 29 Nov 2007 07:26:40 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071129122640.9B4C53F016@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv4185 Modified Files: slime.el ChangeLog Log Message: 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. --- /project/slime/cvsroot/slime/slime.el 2007/11/24 08:14:50 1.880 +++ /project/slime/cvsroot/slime/slime.el 2007/11/29 12:26:39 1.881 @@ -495,6 +495,11 @@ (t name)))) (format "%s" (read name)))) +(defun slime-pretty-current-package () + "Retrun a prettied version of `slime-current-package'." + (let ((p (slime-current-package))) + (and p (slime-pretty-package-name p)))) + (when slime-update-modeline-package (run-with-idle-timer 0.2 0.2 'slime-update-modeline-package)) @@ -3306,8 +3311,8 @@ (defun slime-repl-set-package (package) "Set the package of the REPL buffer to PACKAGE." - (interactive (list (slime-read-package-name "Package: " - (slime-find-buffer-package)))) + (interactive (list (slime-read-package-name + "Package: " (slime-pretty-current-package)))) (with-current-buffer (slime-output-buffer) (let ((unfinished-input (slime-repl-current-input))) (destructuring-bind (name prompt-string) @@ -6381,7 +6386,7 @@ (defun slime-set-package (package) (interactive (list (slime-read-package-name "Package: " - (slime-find-buffer-package)))) + (slime-pretty-current-package)))) (message "*package*: %s" (slime-eval `(swank:set-package ,package)))) (defun slime-set-default-directory (directory) --- /project/slime/cvsroot/slime/ChangeLog 2007/11/24 08:19:25 1.1250 +++ /project/slime/cvsroot/slime/ChangeLog 2007/11/29 12:26:40 1.1251 @@ -1,3 +1,13 @@ +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. @@ -10,7 +20,7 @@ 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. @@ -18,7 +28,7 @@ * 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 @@ -38,7 +48,7 @@ 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. @@ -46,7 +56,7 @@ * 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 From trittweiler at common-lisp.net Thu Nov 29 12:35:54 2007 From: trittweiler at common-lisp.net (trittweiler) Date: Thu, 29 Nov 2007 07:35:54 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071129123554.D927B32033@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv5187 Modified Files: swank.lisp Log Message: * swank.lisp (valid-function-name-p): Fixed wrt. setf functions. --- /project/slime/cvsroot/slime/swank.lisp 2007/11/24 08:14:50 1.518 +++ /project/slime/cvsroot/slime/swank.lisp 2007/11/29 12:35:54 1.519 @@ -2858,15 +2858,13 @@ *inspectee-actions* (make-array 10 :adjustable t :fill-pointer 0) *inspector-history* (make-array 10 :adjustable t :fill-pointer 0))) -;; FIXME: Unused? (defun valid-function-name-p (form) - (or (and (not (null form)) - (not (eq form t)) - (symbolp form)) + (or (symbolp form) (and (consp form) (second form) (not (third form)) - (eq (first form) 'setf)))) + (eq (first form) 'setf) + (symbolp (second form))))) (defslimefun init-inspector (string) (with-buffer-syntax () From trittweiler at common-lisp.net Thu Nov 29 12:36:06 2007 From: trittweiler at common-lisp.net (trittweiler) Date: Thu, 29 Nov 2007 07:36:06 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071129123606.68FC332033@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv5222 Modified Files: ChangeLog Log Message: * swank.lisp (valid-function-name-p): Fixed wrt. setf functions. --- /project/slime/cvsroot/slime/ChangeLog 2007/11/29 12:26:40 1.1251 +++ /project/slime/cvsroot/slime/ChangeLog 2007/11/29 12:36:06 1.1252 @@ -1,3 +1,7 @@ +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. From trittweiler at common-lisp.net Thu Nov 29 12:38:01 2007 From: trittweiler at common-lisp.net (trittweiler) Date: Thu, 29 Nov 2007 07:38:01 -0500 (EST) Subject: [slime-cvs] CVS slime/contrib Message-ID: <20071129123801.B336C7E008@common-lisp.net> Update of /project/slime/cvsroot/slime/contrib In directory clnet:/tmp/cvs-serv5333/contrib Modified Files: swank-arglists.lisp Log Message: * swank-arglists.lisp (arglist-dispatch 'defmethod): Use VALID-FUNCTION-NAME-P. Fixes error on certain `(defmethod (setf ...))' forms. --- /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2007/11/27 17:27:12 1.14 +++ /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2007/11/29 12:38:01 1.15 @@ -1006,7 +1006,6 @@ (split-form-spec form-spec) (arglist-dispatch type operator arguments :remove-args remove-args)))) - (defmacro with-availability ((var) form &body body) `(let ((,var ,form)) (if (eql ,var :not-available) @@ -1043,9 +1042,7 @@ (not (null arguments)) ;have generic function name (notany #'listp (rest arguments))) ;don't have arglist yet (let* ((gf-name (first arguments)) - (gf (and (or (symbolp gf-name) - (and (listp gf-name) - (eql (first gf-name) 'setf))) + (gf (and (valid-function-name-p gf-name) (fboundp gf-name) (fdefinition gf-name)))) (when (typep gf 'generic-function) From trittweiler at common-lisp.net Thu Nov 29 12:38:09 2007 From: trittweiler at common-lisp.net (trittweiler) Date: Thu, 29 Nov 2007 07:38:09 -0500 (EST) Subject: [slime-cvs] CVS slime/contrib Message-ID: <20071129123809.506EF4908C@common-lisp.net> Update of /project/slime/cvsroot/slime/contrib In directory clnet:/tmp/cvs-serv5379/contrib Modified Files: ChangeLog Log Message: * swank-arglists.lisp (arglist-dispatch 'defmethod): Use VALID-FUNCTION-NAME-P. Fixes error on certain `(defmethod (setf ...))' forms. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2007/11/27 16:20:12 1.67 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2007/11/29 12:38:09 1.68 @@ -1,6 +1,12 @@ 2007-11-27 Tobias C. Rittweiler - * swank-arglists (print-arglist): Print initforms in &optional and + * swank-arglists.lisp (arglist-dispatch 'defmethod): Use + VALID-FUNCTION-NAME-P. Fixes error on certain `(defmethod (setf ...))' + forms. + +2007-11-27 Tobias C. Rittweiler + + * swank-arglists.lisp (print-arglist): Print initforms in &optional and &key lambda list specifiers as if by PRIN1 instead of PRINC. Reported by Michael Weber. From heller at common-lisp.net Fri Nov 30 13:09:49 2007 From: heller at common-lisp.net (heller) Date: Fri, 30 Nov 2007 08:09:49 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071130130949.53BC14D048@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv24343 Modified Files: swank.lisp Log Message: 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. --- /project/slime/cvsroot/slime/swank.lisp 2007/11/29 12:35:54 1.519 +++ /project/slime/cvsroot/slime/swank.lisp 2007/11/30 13:09:49 1.520 @@ -103,9 +103,15 @@ (*print-array* . t) (*print-lines* . 10) (*print-escape* . t) - (*print-right-margin* . ,most-positive-fixnum)) + (*print-right-margin* . 65)) "A set of printer variables used in the debugger.") +(defvar *backtrace-printer-bindings* + `((*print-pretty* . nil) + (*print-level* . 4) + (*print-length* . 6)) + "Pretter settings for printing backtraces.") + (defvar *default-worker-thread-bindings* '() "An alist to initialize dynamic variables in worker threads. The list has the form ((VAR . VALUE) ...). Each variable VAR will be @@ -2043,8 +2049,9 @@ (loop for frame in (compute-backtrace start end) for i from start collect (list i (with-output-to-string (stream) - (handler-case - (print-frame frame stream) + (handler-case + (with-bindings *backtrace-printer-bindings* + (print-frame frame stream)) (t () (format stream "[error printing frame]"))))))) @@ -2128,11 +2135,12 @@ (defslimefun frame-locals-for-emacs (index) "Return a property list ((&key NAME ID VALUE) ...) describing the local variables in the frame INDEX." - (mapcar (lambda (frame-locals) - (destructuring-bind (&key name id value) frame-locals - (list :name (prin1-to-string name) :id id - :value (to-string value)))) - (frame-locals index))) + (with-bindings *backtrace-printer-bindings* + (mapcar (lambda (frame-locals) + (destructuring-bind (&key name id value) frame-locals + (list :name (prin1-to-string name) :id id + :value (to-string value)))) + (frame-locals index)))) (defslimefun frame-catch-tags-for-emacs (frame-index) (mapcar #'to-string (frame-catch-tags frame-index))) From heller at common-lisp.net Fri Nov 30 13:10:40 2007 From: heller at common-lisp.net (heller) Date: Fri, 30 Nov 2007 08:10:40 -0500 (EST) Subject: [slime-cvs] CVS slime Message-ID: <20071130131040.807C6601C0@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv24479 Modified Files: swank-cmucl.lisp ChangeLog Log Message: Handle byte-functions without debug-info. * swank-cmucl.lisp (byte-function-location): Return an error if the component has no debug-info. --- /project/slime/cvsroot/slime/swank-cmucl.lisp 2007/09/05 12:04:43 1.174 +++ /project/slime/cvsroot/slime/swank-cmucl.lisp 2007/11/30 13:10:40 1.175 @@ -911,16 +911,17 @@ (vm::find-code-object function)) (not (eq closure function)))) - -(defun byte-function-location (fn) - "Return the location of the byte-compiled function FN." - (etypecase fn +(defun byte-function-location (fun) + "Return the location of the byte-compiled function FUN." + (etypecase fun ((or c::hairy-byte-function c::simple-byte-function) - (let* ((component (c::byte-function-component fn)) - (debug-info (kernel:%code-debug-info component))) - (debug-info-function-name-location debug-info))) + (let* ((di (kernel:%code-debug-info (c::byte-function-component fun)))) + (if di + (debug-info-function-name-location di) + `(:error + ,(format nil "Byte-function without debug-info: ~a" fun))))) (c::byte-closure - (byte-function-location (c::byte-closure-function fn))))) + (byte-function-location (c::byte-closure-function fun))))) ;;; Here we deal with structure accessors. Note that `dd' is a ;;; "defstruct descriptor" structure in CMUCL. A `dd' describes a --- /project/slime/cvsroot/slime/ChangeLog 2007/11/29 12:36:06 1.1252 +++ /project/slime/cvsroot/slime/ChangeLog 2007/11/30 13:10:40 1.1253 @@ -1,7 +1,22 @@ +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.