From mkoeppe at common-lisp.net Thu May 4 14:38:07 2006 From: mkoeppe at common-lisp.net (mkoeppe) Date: Thu, 4 May 2006 10:38:07 -0400 (EDT) Subject: [slime-cvs] CVS slime Message-ID: <20060504143807.46FDE7D002@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv27677 Modified Files: swank-allegro.lisp Log Message: (fspec-definition-locations): Handle :top-level-form entries that appear in backtraces. --- /project/slime/cvsroot/slime/swank-allegro.lisp 2006/03/24 07:30:18 1.86 +++ /project/slime/cvsroot/slime/swank-allegro.lisp 2006/05/04 14:38:07 1.87 @@ -400,16 +400,25 @@ (prin1-to-string (second fspec))))))) (defun fspec-definition-locations (fspec) - (let ((defs (excl::find-source-file fspec))) - (if (null defs) - (list - (list (list nil fspec) - (list :error - (format nil "Unknown source location for ~A" - (fspec->string fspec))))) + (cond + ((and (listp fspec) + (eql (car fspec) :top-level-form)) + (destructuring-bind (top-level-form file position) fspec + (list + (list (list nil fspec) + (make-location (list :buffer file) + (list :position position)))))) + (t + (let ((defs (excl::find-source-file fspec))) + (if (null defs) + (list + (list (list nil fspec) + (list :error + (format nil "Unknown source location for ~A" + (fspec->string fspec))))) (loop for (fspec type file top-level) in defs - collect (list (list type fspec) - (find-fspec-location fspec type file top-level)))))) + collect (list (list type fspec) + (find-fspec-location fspec type file top-level)))))))) (defimplementation find-definitions (symbol) (fspec-definition-locations symbol)) From mkoeppe at common-lisp.net Thu May 4 14:38:17 2006 From: mkoeppe at common-lisp.net (mkoeppe) Date: Thu, 4 May 2006 10:38:17 -0400 (EDT) Subject: [slime-cvs] CVS slime Message-ID: <20060504143817.4CBB07D002@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv27716 Modified Files: ChangeLog Log Message: *** empty log message *** --- /project/slime/cvsroot/slime/ChangeLog 2006/04/20 09:10:36 1.891 +++ /project/slime/cvsroot/slime/ChangeLog 2006/05/04 14:38:17 1.892 @@ -1,3 +1,8 @@ +2006-05-04 Matthias Koeppe + + * swank-allegro.lisp (fspec-definition-locations): Handle + :top-level-form entries that appear in backtraces. + 2006-04-20 Marco Baringer * swank-openmcl.lisp (toggle-trace): Implemented. Currently only From mkoeppe at common-lisp.net Fri May 12 12:21:45 2006 From: mkoeppe at common-lisp.net (mkoeppe) Date: Fri, 12 May 2006 08:21:45 -0400 (EDT) Subject: [slime-cvs] CVS slime Message-ID: <20060512122145.5BB6849034@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv3724 Modified Files: swank.lisp Log Message: Fix for problem with Allegro CL 8.0: If I type M-x slime-update-indentation, Allegro CL starts growing until it hits a STORAGE-CONDITION or even segfaults. --- /project/slime/cvsroot/slime/swank.lisp 2006/04/20 05:46:49 1.377 +++ /project/slime/cvsroot/slime/swank.lisp 2006/05/12 12:21:45 1.378 @@ -4605,7 +4605,8 @@ after each command.") (defslimefun update-indentation-information () - (perform-indentation-update *emacs-connection* t)) + (perform-indentation-update *emacs-connection* t) + nil) ;; This function is for *PRE-REPLY-HOOK*. (defun sync-indentation-to-emacs () From mkoeppe at common-lisp.net Fri May 12 12:22:02 2006 From: mkoeppe at common-lisp.net (mkoeppe) Date: Fri, 12 May 2006 08:22:02 -0400 (EDT) Subject: [slime-cvs] CVS slime Message-ID: <20060512122202.2A1DF4C00B@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv3770 Modified Files: ChangeLog Log Message: *** empty log message *** --- /project/slime/cvsroot/slime/ChangeLog 2006/05/04 14:38:17 1.892 +++ /project/slime/cvsroot/slime/ChangeLog 2006/05/12 12:22:01 1.893 @@ -1,3 +1,10 @@ +2006-05-12 Matthias Koeppe + + * swank.lisp (update-indentation-information): Fix for problem + with Allegro CL 8.0: If I type M-x slime-update-indentation, + Allegro CL starts growing until it hits a STORAGE-CONDITION or + even segfaults. + 2006-05-04 Matthias Koeppe * swank-allegro.lisp (fspec-definition-locations): Handle From mbaringer at common-lisp.net Sun May 14 09:00:43 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Sun, 14 May 2006 05:00:43 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060514090043.A31A449035@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv17917 Modified Files: ChangeLog Log Message: --- /project/slime/cvsroot//slime/ChangeLog 2006/05/12 12:22:01 1.893 +++ /project/slime/cvsroot//slime/ChangeLog 2006/05/14 09:00:43 1.894 @@ -1,3 +1,8 @@ +2006-05-14 Marco Baringer + + * slime.el (slime-macroexpansion-minor-mode-map): Rebind 'undo' to + set buffer-read-only temporarily to t. + 2006-05-12 Matthias Koeppe * swank.lisp (update-indentation-information): Fix for problem From mbaringer at common-lisp.net Sun May 14 09:01:16 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Sun, 14 May 2006 05:01:16 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060514090116.E6CD652002@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv17971 Modified Files: slime.el Log Message: (slime-macroexpansion-minor-mode-map): Rebind 'undo' to set buffer-read-only temporarily to t. --- /project/slime/cvsroot//slime/slime.el 2006/04/14 16:06:56 1.618 +++ /project/slime/cvsroot//slime/slime.el 2006/05/14 09:01:16 1.619 @@ -7297,7 +7297,7 @@ (let ((buffer (current-buffer))) (delete-windows-on buffer) (kill-buffer buffer))) - + ;;;; Macroexpansion @@ -7309,10 +7309,14 @@ ("g" . slime-macroexpand-again))) (flet ((remap (from to) - (dolist (mapping (where-is-internal from slime-mode-map)) - (define-key slime-macroexpansion-minor-mode-map mapping to)))) + (dolist (mapping (where-is-internal from slime-mode-map)) + (define-key slime-macroexpansion-minor-mode-map mapping to)))) (remap 'slime-macroexpand-1 'slime-macroexpand-1-inplace) - (remap 'slime-macroexpand-all 'slime-macroexpand-all-inplace)) + (remap 'slime-macroexpand-all 'slime-macroexpand-all-inplace) + (remap 'undo '(lambda (&optional arg) + (interactive) + (let ((buffer-read-only nil)) + (undo arg))))) (defvar slime-eval-macroexpand-expression nil "Specifies the last macroexpansion preformed. This variable From mbaringer at common-lisp.net Sun May 14 13:24:49 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Sun, 14 May 2006 09:24:49 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060514132449.5CE8B4D00A@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv22876 Modified Files: slime.el Log Message: (slime-repl-return): Only send repl input if point is past a complete form. --- /project/slime/cvsroot//slime/slime.el 2006/05/14 09:01:16 1.619 +++ /project/slime/cvsroot//slime/slime.el 2006/05/14 13:24:48 1.620 @@ -3541,8 +3541,8 @@ (< (point) slime-repl-input-start-mark)) (slime-repl-grab-old-output end-of-input) (slime-repl-recenter-if-needed)) - ((slime-input-complete-p slime-repl-input-start-mark - slime-repl-input-end-mark) + ((slime-input-complete-p slime-repl-input-start-mark + (min (point) slime-repl-input-end-mark)) (slime-repl-send-input t)) (t (slime-repl-newline-and-indent) From mbaringer at common-lisp.net Sun May 14 13:25:01 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Sun, 14 May 2006 09:25:01 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060514132501.E65404E009@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv22921 Modified Files: ChangeLog Log Message: --- /project/slime/cvsroot//slime/ChangeLog 2006/05/14 09:00:43 1.894 +++ /project/slime/cvsroot//slime/ChangeLog 2006/05/14 13:25:01 1.895 @@ -2,6 +2,8 @@ * slime.el (slime-macroexpansion-minor-mode-map): Rebind 'undo' to set buffer-read-only temporarily to t. + (slime-repl-return): Only send repl input if point is past a + complete form. 2006-05-12 Matthias Koeppe From mbaringer at common-lisp.net Tue May 16 18:04:49 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Tue, 16 May 2006 14:04:49 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060516180449.4FC121029@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv31474 Modified Files: ChangeLog Log Message: --- /project/slime/cvsroot//slime/ChangeLog 2006/05/14 13:25:01 1.895 +++ /project/slime/cvsroot//slime/ChangeLog 2006/05/16 18:04:49 1.896 @@ -1,3 +1,9 @@ +2006-05-16 Marco Baringer + + * slime.el (slime-repl-return-behaviour): New variable which + controls slime-repl-return's heaviour. + (slime-repl-return): Respect slime-repl-return-behaviour. + 2006-05-14 Marco Baringer * slime.el (slime-macroexpansion-minor-mode-map): Rebind 'undo' to From mbaringer at common-lisp.net Tue May 16 18:05:23 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Tue, 16 May 2006 14:05:23 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060516180523.7D137102F@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv31592 Modified Files: slime.el Log Message: (slime-repl-return-behaviour): New variable which controls slime-repl-return's heaviour. (slime-repl-return): Respect slime-repl-return-behaviour. --- /project/slime/cvsroot//slime/slime.el 2006/05/14 13:24:48 1.620 +++ /project/slime/cvsroot//slime/slime.el 2006/05/16 18:05:23 1.621 @@ -415,6 +415,26 @@ :type '(boolean) :group 'slime-repl) +(defcustom slime-repl-return-behaviour :send-if-complete + "Keyword specifying how slime-repl-return behaves when the + point is on a lisp expression (as opposed to being on a + previous output). + +Currently only two values are supported: + +:send-if-complete - If the current expression is complete, as per +slime-input-complete-p, it is sent to the underlying lisp, +otherwise a newline is inserted. The current value of (point) has +no effect. + +:send-if-after-complete - If the current expression is complete +and point is after the expression it is sent, otherwise a newline +is inserted." + :type '(choice (const :send-if-complete) + (const :send-if-after-complete)) + :group 'slime-repl) + + (defface slime-repl-prompt-face (if (slime-face-inheritance-possible-p) '((t (:inherit font-lock-keyword-face))) @@ -3542,7 +3562,9 @@ (slime-repl-grab-old-output end-of-input) (slime-repl-recenter-if-needed)) ((slime-input-complete-p slime-repl-input-start-mark - (min (point) slime-repl-input-end-mark)) + (case slime-repl-return-behaviour + (:send-if-after-complete (min (point) slime-repl-input-end-mark)) + (:send-if-complete slime-repl-input-end-mark))) (slime-repl-send-input t)) (t (slime-repl-newline-and-indent) From mbaringer at common-lisp.net Tue May 16 18:10:33 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Tue, 16 May 2006 14:10:33 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060516181033.12B8E7700E@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv31756 Modified Files: slime.el Log Message: --- /project/slime/cvsroot//slime/slime.el 2006/05/16 18:05:23 1.621 +++ /project/slime/cvsroot//slime/slime.el 2006/05/16 18:10:32 1.622 @@ -427,11 +427,11 @@ otherwise a newline is inserted. The current value of (point) has no effect. -:send-if-after-complete - If the current expression is complete +:send-only-if-after-complete - If the current expression is complete and point is after the expression it is sent, otherwise a newline is inserted." :type '(choice (const :send-if-complete) - (const :send-if-after-complete)) + (const :send-only-if-after-complete)) :group 'slime-repl) @@ -3562,8 +3562,8 @@ (slime-repl-grab-old-output end-of-input) (slime-repl-recenter-if-needed)) ((slime-input-complete-p slime-repl-input-start-mark - (case slime-repl-return-behaviour - (:send-if-after-complete (min (point) slime-repl-input-end-mark)) + (ecase slime-repl-return-behaviour + (:send-only-if-after-complete (min (point) slime-repl-input-end-mark)) (:send-if-complete slime-repl-input-end-mark))) (slime-repl-send-input t)) (t From aruttenberg at common-lisp.net Wed May 24 21:26:19 2006 From: aruttenberg at common-lisp.net (aruttenberg) Date: Wed, 24 May 2006 17:26:19 -0400 (EDT) Subject: [slime-cvs] CVS slime Message-ID: <20060524212619.6F25C61037@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv25897 Modified Files: swank-abcl.lisp ChangeLog Log Message: 2006-05-24 Alan Ruttenberg * swank-abcl: Add some more mop functions to you can inspect classes, generic functions, methods, slots. --- /project/slime/cvsroot/slime/swank-abcl.lisp 2006/04/16 23:33:38 1.35 +++ /project/slime/cvsroot/slime/swank-abcl.lisp 2006/05/24 21:26:19 1.36 @@ -35,17 +35,30 @@ ;;; swank-mop -;;dummies: +;;dummies and definition (defclass standard-slot-definition ()()) -(defun class-finalized-p (class) t) +;(defun class-finalized-p (class) t) (defun slot-definition-documentation (slot) #+nil (documentation slot 't)) (defun slot-definition-type (slot) t) (defun class-prototype (class)) (defun generic-function-declarations (gf)) -(defun specializer-direct-methods (spec) nil) +(defun specializer-direct-methods (spec) (mop::class-direct-methods spec)) + +(defun slot-definition-name (slot) + (mop::%slot-definition-name slot)) + +(defun class-slots (class) + (mop::%class-slots class)) + +(defun method-generic-function (method) + (mop::%method-generic-function method)) + +(defun method-function (method) + (mop::%method-function method)) + (import-to-swank-mop '( ;; classes @@ -60,12 +73,12 @@ mop::class-direct-subclasses mop::class-direct-superclasses mop::eql-specializer - class-finalized-p ;;dummy + mop::class-finalized-p cl:class-name mop::class-precedence-list class-prototype ;;dummy - mop::class-slots - specializer-direct-methods ;;dummy + class-slots + specializer-direct-methods ;; eql-specializer accessors mop::eql-specializer-object ;; generic function readers @@ -77,8 +90,8 @@ mop::generic-function-method-combination mop::generic-function-name ;; method readers - mop::method-generic-function - mop::method-function + method-generic-function + method-function mop::method-lambda-list mop::method-specializers mop::method-qualifiers @@ -88,7 +101,7 @@ mop::slot-definition-initargs mop::slot-definition-initform mop::slot-definition-initfunction - mop::slot-definition-name + slot-definition-name slot-definition-type ;;dummy mop::slot-definition-readers mop::slot-definition-writers)) @@ -506,3 +519,6 @@ (defimplementation quit-lisp () (ext:exit)) + + + --- /project/slime/cvsroot/slime/ChangeLog 2006/05/16 18:04:49 1.896 +++ /project/slime/cvsroot/slime/ChangeLog 2006/05/24 21:26:19 1.897 @@ -1,3 +1,7 @@ +2006-05-24 Alan Ruttenberg + * swank-abcl: Add some more mop functions to you can inspect classes, + generic functions, methods, slots. + 2006-05-16 Marco Baringer * slime.el (slime-repl-return-behaviour): New variable which From bdowning at common-lisp.net Thu May 25 03:15:20 2006 From: bdowning at common-lisp.net (bdowning) Date: Wed, 24 May 2006 23:15:20 -0400 (EDT) Subject: [slime-cvs] CVS slime Message-ID: <20060525031520.89E261800D@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv6750 Modified Files: swank.lisp ChangeLog Log Message: * swank.lisp (recursively-compute-most-completions & friends): Micro-optimize the fuzzy completion engine, improving performace by a factor of about 4 on SBCL. However, it will only work on simple-strings now, and CHAR= is burned in instead of being an option. I don't think this is too much of a limitation. At this point rendering the results on the emacs side takes much longer than finding them for long result lists. --- /project/slime/cvsroot/slime/swank.lisp 2006/05/12 12:21:45 1.378 +++ /project/slime/cvsroot/slime/swank.lisp 2006/05/25 03:15:20 1.379 @@ -3192,7 +3192,7 @@ (and (or (not external) (symbol-external-p symbol package)) (compute-highest-scoring-completion - string (funcall converter (symbol-name symbol)) #'char=)))) + string (funcall converter (symbol-name symbol)))))) (do-symbols (symbol package) (if (string= "" string) (when (or (and external (symbol-external-p symbol package)) @@ -3214,7 +3214,7 @@ ":") for (result score) = (multiple-value-list (compute-highest-scoring-completion - name package-name #'char=)) + name package-name)) if result collect (list package-name score result)))) (defslimefun fuzzy-completion-selected (original-string completion) @@ -3241,37 +3241,38 @@ Most natural language searches and symbols do not have this problem -- this is only here as a safeguard.") +(declaim (fixnum *fuzzy-recursion-soft-limit*)) -(defun compute-highest-scoring-completion (short full test) +(defun compute-highest-scoring-completion (short full) "Finds the highest scoring way to complete the abbreviation -SHORT onto the string FULL, using TEST as a equality function for +SHORT onto the string FULL, using CHAR= as a equality function for letters. Returns two values: The first being the completion chunks of the high scorer, and the second being the score." (let* ((scored-results (mapcar #'(lambda (result) (cons (score-completion result short full) result)) - (compute-most-completions short full test))) + (compute-most-completions short full))) (winner (first (sort scored-results #'> :key #'first)))) (values (rest winner) (first winner)))) -(defun compute-most-completions (short full test) +(defun compute-most-completions (short full) "Finds most possible ways to complete FULL with the letters in SHORT. Calls RECURSIVELY-COMPUTE-MOST-COMPLETIONS recursively. Returns a list of (&rest CHUNKS), where each CHUNKS is a description of how a completion matches." (let ((*all-chunks* nil)) (declare (special *all-chunks*)) - (recursively-compute-most-completions short full test 0 0 nil nil nil t) + (recursively-compute-most-completions short full 0 0 nil nil nil t) *all-chunks*)) (defun recursively-compute-most-completions - (short full test + (short full short-index initial-full-index chunks current-chunk current-chunk-pos recurse-p) "Recursively (if RECURSE-P is true) find /most/ possible ways -to fuzzily map the letters in SHORT onto FULL, with TEST being a -function to determine if two letters match. +to fuzzily map the letters in SHORT onto FULL, using CHAR= to +determine if two letters match. A chunk is a list of elements that have matched consecutively. When consecutive matches stop, it is coerced into a string, @@ -3287,7 +3288,10 @@ Once a word has been completely matched, the chunks are pushed onto the special variable *ALL-CHUNKS* and the function returns." - (declare (special *all-chunks*)) + (declare (optimize speed) + (fixnum short-index initial-full-index) + (simple-string short full) + (special *all-chunks*)) (flet ((short-cur () "Returns the next letter from the abbreviation, or NIL if all have been used." @@ -3316,13 +3320,13 @@ ((= pos (length full))) (let ((cur-char (aref full pos))) (if (and (short-cur) - (funcall test cur-char (short-cur))) + (char= cur-char (short-cur))) (progn (when recurse-p ;; Try other possibilities, limiting insanely deep ;; recursion somewhat. (recursively-compute-most-completions - short full test short-index (1+ pos) + short full short-index (1+ pos) chunks current-chunk current-chunk-pos (not (> (length *all-chunks*) *fuzzy-recursion-soft-limit*)))) --- /project/slime/cvsroot/slime/ChangeLog 2006/05/24 21:26:19 1.897 +++ /project/slime/cvsroot/slime/ChangeLog 2006/05/25 03:15:20 1.898 @@ -1,3 +1,13 @@ +2006-05-24 Brian Downing + + * swank.lisp (recursively-compute-most-completions & friends): + Micro-optimize the fuzzy completion engine, improving performace + by a factor of about 4 on SBCL. However, it will only work on + simple-strings now, and CHAR= is burned in instead of being an + option. I don't think this is too much of a limitation. At this + point rendering the results on the emacs side takes much longer + than finding them for long result lists. + 2006-05-24 Alan Ruttenberg * swank-abcl: Add some more mop functions to you can inspect classes, generic functions, methods, slots. From mbaringer at common-lisp.net Fri May 26 20:13:41 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Fri, 26 May 2006 16:13:41 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060526201341.DDE3A28149@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv25331 Modified Files: ChangeLog Log Message: --- /project/slime/cvsroot//slime/ChangeLog 2006/05/25 03:15:20 1.898 +++ /project/slime/cvsroot//slime/ChangeLog 2006/05/26 20:13:41 1.899 @@ -1,4 +1,13 @@ -2006-05-24 Brian Downing +2006-05-26 Tobias C. Rittweiler + + * slime.el (slime-eval-macroexpand-inplace): Fix out-of-range + error on in-place macroexpand when point is placed at a closing + parenthesis. In this case the sexp closed by that paren is + expanded. + Also make expanding of expressions work that are quoted like, for + instance, "'(FOO BAR)" if point is placed at the opening paren. + +006-05-24 Brian Downing * swank.lisp (recursively-compute-most-completions & friends): Micro-optimize the fuzzy completion engine, improving performace From mbaringer at common-lisp.net Fri May 26 20:14:20 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Fri, 26 May 2006 16:14:20 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060526201420.BFAB32B02B@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv25474 Modified Files: slime.el Log Message: --- /project/slime/cvsroot//slime/slime.el 2006/05/16 18:10:32 1.622 +++ /project/slime/cvsroot//slime/slime.el 2006/05/26 20:14:19 1.623 @@ -7364,10 +7364,17 @@ NB: Does not affect *slime-eval-macroexpand-expression*" (interactive) (lexical-let* ((string (slime-sexp-at-point-or-error)) + (bounds (bounds-of-thing-at-point 'sexp)) + (start (car bounds)) + (end (cdr bounds)) + (point (point)) (package (slime-current-package)) - (start (point)) - (end (+ start (length string))) (buffer (current-buffer))) + ;; SLIME-SEXP-AT-POINT returns "'(FOO BAR BAZ)" even when point is + ;; placed at the opening parenthesis, which wouldn't get expanded + ;; even though FOO was a macro. Hence this workaround: + (when (and (eq ?\' (elt string 0)) (eq ?\( (elt string 1))) + (setf string (substring string 1)) (incf start)) (slime-eval-async `(,expander ,string) (lambda (expansion) @@ -7377,7 +7384,8 @@ (delete-region start end) (insert expansion) (goto-char start) - (indent-sexp))))))) + (indent-sexp) + (goto-char point))))))) (defun slime-macroexpand-1 (&optional repeatedly) "Display the macro expansion of the form at point. The form is From aruttenberg at common-lisp.net Sat May 27 04:18:13 2006 From: aruttenberg at common-lisp.net (aruttenberg) Date: Sat, 27 May 2006 00:18:13 -0400 (EDT) Subject: [slime-cvs] CVS slime Message-ID: <20060527041813.CD6D224002@common-lisp.net> Update of /project/slime/cvsroot/slime In directory clnet:/tmp/cvs-serv23945 Modified Files: swank-abcl.lisp ChangeLog Log Message: 2006-05-27 Alan Ruttenberg * swank-abcl: slot-boundp-using-class slot-value-using-class so you can inspect instances --- /project/slime/cvsroot/slime/swank-abcl.lisp 2006/05/24 21:26:19 1.36 +++ /project/slime/cvsroot/slime/swank-abcl.lisp 2006/05/27 04:18:13 1.37 @@ -59,6 +59,11 @@ (defun method-function (method) (mop::%method-function method)) +(defun slot-boundp-using-class (class object slotdef) + (system::slot-boundp object (slot-definition-name slotdef))) + +(defun slot-value-using-class (class object slotdef) + (system::slot-value object (slot-definition-name slotdef))) (import-to-swank-mop '( ;; classes @@ -104,7 +109,10 @@ slot-definition-name slot-definition-type ;;dummy mop::slot-definition-readers - mop::slot-definition-writers)) + mop::slot-definition-writers + slot-boundp-using-class + slot-value-using-class + )) ;;;; TCP Server --- /project/slime/cvsroot/slime/ChangeLog 2006/05/26 20:13:41 1.899 +++ /project/slime/cvsroot/slime/ChangeLog 2006/05/27 04:18:13 1.900 @@ -1,3 +1,7 @@ +2006-05-27 Alan Ruttenberg + * swank-abcl: slot-boundp-using-class slot-value-using-class so you + can inspect instances + 2006-05-26 Tobias C. Rittweiler * slime.el (slime-eval-macroexpand-inplace): Fix out-of-range From mbaringer at common-lisp.net Sat May 27 09:06:12 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Sat, 27 May 2006 05:06:12 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060527090612.1DC7D12034@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv32427 Modified Files: ChangeLog Log Message: --- /project/slime/cvsroot//slime/ChangeLog 2006/05/27 04:18:13 1.900 +++ /project/slime/cvsroot//slime/ChangeLog 2006/05/27 09:06:12 1.901 @@ -11,7 +11,7 @@ Also make expanding of expressions work that are quoted like, for instance, "'(FOO BAR)" if point is placed at the opening paren. -006-05-24 Brian Downing +2006-05-24 Brian Downing * swank.lisp (recursively-compute-most-completions & friends): Micro-optimize the fuzzy completion engine, improving performace From mbaringer at common-lisp.net Mon May 29 23:18:35 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Mon, 29 May 2006 19:18:35 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060529231835.B3CAE59100@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv18939 Modified Files: slime.el Log Message: (slime-use-autodoc-mode): Fix typo in docstring. (slime-use-highlight-edits-mode): New variable, analogous to SLIME-USE-AUTODOC-MODE. (slime-setup, slime-lisp-mode-hook): Make above variable work. Also, activates the HIGHLIGHT-EDITS-MODE in proper way (thus avoiding the nasty "Toggling ... off; better pass an explicit argument." message.) Fix typo in comment about communication protocol. --- /project/slime/cvsroot//slime/slime.el 2006/05/26 20:14:19 1.623 +++ /project/slime/cvsroot//slime/slime.el 2006/05/29 23:18:35 1.624 @@ -65,7 +65,10 @@ (require 'easymenu) (defvar slime-use-autodoc-mode nil - "When non-nil always enabled slime-autodoc-mode in slime-mode.") + "When non-nil always enable slime-autodoc-mode in slime-mode.") + +(defvar slime-use-highlight-edits-mode nil + "When non-nil always enable slime-highlight-edits-mode in slime-mode") (defun* slime-setup (&key autodoc typeout-frame highlight-edits) "Setup Emacs so that lisp-mode buffers always use SLIME." @@ -73,15 +76,16 @@ (when typeout-frame (add-hook 'slime-connected-hook 'slime-ensure-typeout-frame)) (setq slime-use-autodoc-mode autodoc) - (when highlight-edits - (add-hook 'slime-mode-hook 'slime-highlight-edits-mode))) + (setq slime-use-highlight-edits-mode highlight-edits)) (defun slime-lisp-mode-hook () (slime-mode 1) (set (make-local-variable 'lisp-indent-function) 'common-lisp-indent-function) (when slime-use-autodoc-mode - (slime-autodoc-mode 1))) + (slime-autodoc-mode 1)) + (when slime-use-highlight-edits-mode + (slime-highlight-edits-mode 1))) (eval-and-compile (defvar slime-path @@ -2301,8 +2305,8 @@ This is set only in buffers bound to specific packages.")) ;;; `slime-rex' is the RPC primitive which is used to implement both -;;; `slime-eval' and `slime-eval-async'. You can use it directly you -;;; need to but the others are usually more convenient. +;;; `slime-eval' and `slime-eval-async'. You can use it directly if +;;; you need to, but the others are usually more convenient. (defmacro* slime-rex ((&rest saved-vars) (sexp &optional From mbaringer at common-lisp.net Mon May 29 23:22:57 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Mon, 29 May 2006 19:22:57 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060529232257.508516200B@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv19073 Modified Files: ChangeLog Log Message: --- /project/slime/cvsroot//slime/ChangeLog 2006/05/27 09:06:12 1.901 +++ /project/slime/cvsroot//slime/ChangeLog 2006/05/29 23:22:57 1.902 @@ -1,3 +1,15 @@ +2006-05-30 Tobias Rittweiler + + * slime.el (slime-use-autodoc-mode): Fix typo in docstring. + (slime-use-highlight-edits-mode): New variable, analogous to + SLIME-USE-AUTODOC-MODE. + (slime-setup, slime-lisp-mode-hook): Make above variable + work. Also, activates the HIGHLIGHT-EDITS-MODE in proper way (thus + avoiding the nasty "Toggling ... off; better pass an explicit + argument." message.) + + * slime.el: Fix typo in comment about communication protocol. + 2006-05-27 Alan Ruttenberg * swank-abcl: slot-boundp-using-class slot-value-using-class so you can inspect instances From mbaringer at common-lisp.net Mon May 29 23:39:47 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Mon, 29 May 2006 19:39:47 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060529233947.F18662009@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv20809 Modified Files: slime.el Log Message: (slime-get-temp-buffer-create): New keyword REUSEP which indicates whether an already-existing buffer named like the buffer to be created should be reused, i.e. not killed, then freshly created. Update docstring accordingly. (slime-with-output-to-temp-buffer): Make &optional arg MODE an &key keyword arg. Add REUSEP keyword. (slime-macroexpansion-minor-mode-map): Make remapped `undo' update highlighted edits in the macroexpansion buffer. (slime-eval-macroexpand-in-place): Update highlighted edits when macroexpanding in-place. (slime-eval-macroexpand): Reuse macroexpansion buffer if it exists already to preserve `undo' functionality. --- /project/slime/cvsroot//slime/slime.el 2006/05/29 23:18:35 1.624 +++ /project/slime/cvsroot//slime/slime.el 2006/05/29 23:39:47 1.625 @@ -1190,16 +1190,19 @@ "The window config \"fingerprint\" after displaying the buffer.")) ;; Interface -(defun* slime-get-temp-buffer-create (name &key mode noselectp) +(defun* slime-get-temp-buffer-create (name &key mode noselectp reusep) "Return a fresh temporary buffer called NAME in MODE. The buffer also uses the minor-mode `slime-temp-buffer-mode'. Pressing `q' in the buffer will restore the window configuration to the way it is when the buffer was created, i.e. when this function was called. -If NOSELECTP is true then the buffer is shown by `display-buffer', -otherwise it is shown and selected by `pop-to-buffer'." +If NOSELECTP is true, then the buffer is shown by `display-buffer', +otherwise it is shown and selected by `pop-to-buffer'. + +If REUSEP is true and a buffer does already exist with name NAME, +then the buffer will be reused instead of being killed." (let ((window-config (current-window-configuration))) - (when (get-buffer name) (kill-buffer name)) + (when (and (get-buffer name) (not reusep)) (kill-buffer name)) (with-current-buffer (get-buffer-create name) (when mode (funcall mode)) (slime-temp-buffer-mode 1) @@ -1212,14 +1215,17 @@ (current-buffer)))) ;; Interface -(defmacro* slime-with-output-to-temp-buffer ((name &optional mode) +(defmacro* slime-with-output-to-temp-buffer ((name &key mode reusep) package &rest body) "Similar to `with-output-to-temp-buffer'. Also saves the window configuration, and inherits the current `slime-connection' in a buffer-local variable." `(let ((connection (slime-connection)) - (standard-output (slime-get-temp-buffer-create ,name :mode ',mode))) - (prog1 (with-current-buffer standard-output , at body) + (standard-output (slime-get-temp-buffer-create ,name :mode ',mode + :reusep ,reusep))) + (prog1 (with-current-buffer standard-output + ;; set explicitely to NIL in case the buffer got reused. (REUSEP) + (let ((buffer-read-only nil)) , at body)) (with-current-buffer standard-output (setq slime-buffer-connection connection) (setq slime-buffer-package ,package) @@ -7022,7 +7028,7 @@ (defun slime-show-apropos (plists string package summary) (if (null plists) (message "No apropos matches for %S" string) - (slime-with-output-to-temp-buffer ("*SLIME Apropos*" apropos-mode) package + (slime-with-output-to-temp-buffer ("*SLIME Apropos*" :mode apropos-mode) package (set-syntax-table lisp-mode-syntax-table) (slime-mode t) (if (boundp 'header-line-format) @@ -7342,6 +7348,8 @@ (remap 'undo '(lambda (&optional arg) (interactive) (let ((buffer-read-only nil)) + (when slime-use-highlight-edits-mode + (slime-remove-edits (point-min) (point-max))) (undo arg))))) (defvar slime-eval-macroexpand-expression nil @@ -7357,8 +7365,10 @@ slime-eval-macroexpand-expression (lambda (expansion) (slime-with-output-to-temp-buffer - ("*SLIME macroexpansion*" lisp-mode) package + ;; reusep for preserving `undo' functionality. + ("*SLIME macroexpansion*" :mode lisp-mode :reusep t) package (slime-macroexpansion-minor-mode) + (erase-buffer) (insert expansion) (font-lock-fontify-buffer)))))) @@ -7384,6 +7394,8 @@ (lambda (expansion) (with-current-buffer buffer (let ((buffer-read-only nil)) + (when slime-use-highlight-edits-mode + (slime-remove-edits (point-min) (point-max))) (goto-char start) (delete-region start end) (insert expansion) From mbaringer at common-lisp.net Mon May 29 23:41:00 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Mon, 29 May 2006 19:41:00 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060529234100.C607518012@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv20933 Modified Files: ChangeLog Log Message: --- /project/slime/cvsroot//slime/ChangeLog 2006/05/29 23:22:57 1.902 +++ /project/slime/cvsroot//slime/ChangeLog 2006/05/29 23:41:00 1.903 @@ -1,5 +1,20 @@ 2006-05-30 Tobias Rittweiler + * slime.el (slime-get-temp-buffer-create): New keyword REUSEP + which indicates whether an already-existing buffer named like the + buffer to be created should be reused, i.e. not killed, then + freshly created. Update docstring accordingly. + (slime-with-output-to-temp-buffer): Make &optional arg MODE an + &key keyword arg. Add REUSEP keyword. + (slime-macroexpansion-minor-mode-map): Make remapped `undo' update + highlighted edits in the macroexpansion buffer. + (slime-eval-macroexpand-in-place): Update highlighted edits when + macroexpanding in-place. + (slime-eval-macroexpand): Reuse macroexpansion buffer if it exists + already to preserve `undo' functionality. + +2006-05-30 Tobias Rittweiler + * slime.el (slime-use-autodoc-mode): Fix typo in docstring. (slime-use-highlight-edits-mode): New variable, analogous to SLIME-USE-AUTODOC-MODE. From mbaringer at common-lisp.net Wed May 31 19:27:13 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Wed, 31 May 2006 15:27:13 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060531192713.5685A30A5@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv733 Modified Files: swank.lisp Log Message: (*sldb-quit-restart*): New variable. (throw-to-toplevel): Use the restart named by *sldb-quit-restart* as opposed to hard coding abort-request. --- /project/slime/cvsroot//slime/swank.lisp 2006/05/25 03:15:20 1.379 +++ /project/slime/cvsroot//slime/swank.lisp 2006/05/31 19:27:13 1.380 @@ -2482,6 +2482,9 @@ (defvar *sldb-stepping-p* nil "True when during execution of a stepp command.") +(defvar *sldb-quit-restart* 'abort-request + "What restart should swank attempt to invoke when the user sldb-quits.") + (defun debug-in-emacs (condition) (let ((*swank-debugger-condition* condition) (*sldb-restarts* (compute-restarts condition)) @@ -2617,9 +2620,11 @@ (defslimefun throw-to-toplevel () "Invoke the ABORT-REQUEST restart abort an RPC from Emacs. If we are not evaluating an RPC then ABORT instead." - (let ((restart (find-restart 'abort-request))) + (let ((restart (find-restart *sldb-quit-restart*))) (cond (restart (invoke-restart restart)) - (t "Restart not found: ABORT-REQUEST")))) + (t (format nil + "Restart not found: ~a" + *sldb-quit-restart*))))) (defslimefun invoke-nth-restart-for-emacs (sldb-level n) "Invoke the Nth available restart. From mbaringer at common-lisp.net Wed May 31 19:27:31 2006 From: mbaringer at common-lisp.net (mbaringer) Date: Wed, 31 May 2006 15:27:31 -0400 (EDT) Subject: [slime-cvs] CVS /slime Message-ID: <20060531192731.CF7F130A5@common-lisp.net> Update of /project/slime/cvsroot//slime In directory clnet:/tmp/cvs-serv805 Modified Files: ChangeLog Log Message: --- /project/slime/cvsroot//slime/ChangeLog 2006/05/29 23:41:00 1.903 +++ /project/slime/cvsroot//slime/ChangeLog 2006/05/31 19:27:31 1.904 @@ -1,3 +1,9 @@ +2006-05-31 Nathan Bird + + * swank.lisp (*sldb-quit-restart*): New variable. + (throw-to-toplevel): Use the restart named by *sldb-quit-restart* + as opposed to hard coding abort-request. + 2006-05-30 Tobias Rittweiler * slime.el (slime-get-temp-buffer-create): New keyword REUSEP