Ralf Mattes | 1 Aug 18:37 2006
Picon

Problem using paredit mode with REPL

Hello list,

i'm trying to use paredit-mode in Slime's repl but 
unfortunately enabling paredit mode results in a dysfunctional
repl -- pressing 'enter'/'return' while the pointer is after
the closing sexpression only inserts a newline but doesn't send
the expression to the lisp process. BTW, i tried both supported 
types of slime-repl-return-behavior.

 Cheers Ralf Mattes

Taylor R Campbell | 1 Aug 19:30 2006
Picon

Re: Problem using paredit mode with REPL

   Date: Tue, 01 Aug 2006 18:37:49 +0200
   From: Ralf Mattes <rm <at> mh-freiburg.de>

   i'm trying to use paredit-mode in Slime's repl but 
   unfortunately enabling paredit mode results in a dysfunctional
   repl -- pressing 'enter'/'return' while the pointer is after
   the closing sexpression only inserts a newline but doesn't send
   the expression to the lisp process. BTW, i tried both supported 
   types of slime-repl-return-behavior.

Try the latest paredit beta, available at

   <http://mumble.net/~campbell/emacs/paredit-beta.el>.

It no longer shadows the binding of RET; instead it now follows the
standard GNU Emacs convention of giving C-j a fancy binding and
leaving RET alone.  (You are still free, of course, to bind RET for
your personal use in paredit-mode-map or other places, and indeed I do
this, but Paredit Mode no longer interferes with other bindings of
RET.)
Earl J.Wagner | 1 Aug 22:03 2006
Picon

keyword symbol completion

Ugh. Here's the fixed patch that works for symbols without specified  
packages as well.

Index: swank.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank.lisp,v
retrieving revision 1.387
diff -u -r1.387 swank.lisp
--- swank.lisp	24 Jul 2006 14:01:15 -0000	1.387
+++ swank.lisp	1 Aug 2006 19:32:03 -0000
 <at>  <at>  -1270,7 +1270,9  <at>  <at> 
;; FIXME: deal with #\| etc.  hard to do portably.
(defun tokenize-symbol (string)
    (let ((package (let ((pos (position #\: string)))
-                   (if pos (subseq string 0 pos) nil)))
+                   (cond
+                     ((and pos (= pos 0)) "keyword")
+                     (pos (subseq string 0 pos)))))
          (symbol (let ((pos (position #\: string :from-end t)))
                    (if pos (subseq string (1+ pos)) string)))
          (internp (search "::" string)))
 <at>  <at>  -3089,6 +3091,7  <at>  <at> 
(defun format-completion-result (string internal-p package-name)
    (let ((prefix (cond (internal-p (format nil "~A::" package-name))
+                      ((equal package-name "keyword") ":")
                        (package-name (format nil "~A:" package-name))
                        (t ""))))
      (values (concatenate 'string prefix string)
Earl J. Wagner | 2 Aug 00:37 2006
Picon

patch for editing method definitions from inspector

This fixes a problem in the inspector where I'd hit M-. on the method  
name, then have to choose the method even though the method  
specializers were right there.

Also, the previous patch is for keyword symbol completion. I'm not  
sure if my first (incorrect) patch was posted to the list or blocked.  
It it arrives, ignore it.

-Earl

Index: slime.el
===================================================================
RCS file: /project/slime/cvsroot/slime/slime.el,v
retrieving revision 1.635
diff -u -r1.635 slime.el
--- slime.el	24 Jul 2006 14:01:03 -0000	1.635
+++ slime.el	1 Aug 2006 22:22:03 -0000
 <at>  <at>  -6319,12 +6319,15  <at>  <at> 
                               (:type list))
    dspec location)
+
(defun slime-edit-definition (name &optional where)
    "Lookup the definition of the name at point.
If there's no name at point, or a prefix argument is given, then the
function name is prompted."
    (interactive (list (slime-read-symbol-name "Name: ")))
-  (let ((definitions (slime-eval `(swank:find-definitions-for- 
emacs ,name))))
+  (let* ((method-context (slime-extract-method-context name))
+         (full-name (if method-context (format "%s" method-context)  
(Continue reading)

Earl J. Wagner | 1 Aug 21:49 2006
Picon

keyword symbol completion

Hi all,

Here is a patch to complete keyword symbols.

-Earl

Index: swank.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank.lisp,v
retrieving revision 1.387
diff -u -r1.387 swank.lisp
--- swank.lisp	24 Jul 2006 14:01:15 -0000	1.387
+++ swank.lisp	1 Aug 2006 19:32:03 -0000
 <at>  <at>  -1270,7 +1270,9  <at>  <at> 
;; FIXME: deal with #\| etc.  hard to do portably.
(defun tokenize-symbol (string)
    (let ((package (let ((pos (position #\: string)))
-                   (if pos (subseq string 0 pos) nil)))
+                   (cond
+                     ((= pos 0) "keyword")
+                     (pos (subseq string 0 pos)))))
          (symbol (let ((pos (position #\: string :from-end t)))
                    (if pos (subseq string (1+ pos)) string)))
          (internp (search "::" string)))
 <at>  <at>  -3089,6 +3091,7  <at>  <at> 
(defun format-completion-result (string internal-p package-name)
    (let ((prefix (cond (internal-p (format nil "~A::" package-name))
+                      ((equal package-name "keyword") ":")
                        (package-name (format nil "~A:" package-name))
                        (t ""))))
(Continue reading)

Bob Halley | 7 Aug 10:04 2006
Picon

swank format-iso8601-time bug in non-integer timezones

(resending, since I sent this from the wrong Sender id the first time...)

In format-iso8601-time in swank.lisp, the following code is used to 
compute the timezone offset to print:

(multiple-value-bind (h m) (truncate (abs zone) 1.0)
     ;; Tricky.  Sign of time zone is reversed in ISO 8601
     ;; relative to Common Lisp convention!
     (format nil "~:[+~;-~]~2,'0D:~2,'0D"
                  (> zone 0) h (round m)))

(round m) does the wrong thing in timezones which are not integers.  
E.g. at the moment I am in Adelaide, Australia, and the timezone is 
+09:30, which corresponds to a Common Lisp timezone value of -19/2.  As 
written the code prints my timezone as +09:00.  Rather than (round m), 
we want (round (* m 60)).

Regards,

/Bob

P.S.  Slime rocks, thanks! :)

Gary King | 7 Aug 16:46 2006

minor patch to

The patch below alters the lisp-version-string to accommodate 64 bit  
Allegro and 64 bit OpenMCL.

Any comments...

Index: swank-loader.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-loader.lisp,v
retrieving revision 1.59
diff -u -w -r1.59 swank-loader.lisp
--- swank-loader.lisp	13 Apr 2006 10:41:59 -0000	1.59
+++ swank-loader.lisp	7 Aug 2006 14:30:26 -0000
 <at>  <at>  -66,12 +66,15  <at>  <at> 
    #+scl       (lisp-implementation-version)
    #+sbcl      (lisp-implementation-version)
    #+ecl       (lisp-implementation-version)
-  #+openmcl   (format nil "~d.~d"
+  #+openmcl   (format nil "~d.~d~ <at> [-~d~]"
                        ccl::*openmcl-major-version*
-                      ccl::*openmcl-minor-version*)
+                      ccl::*openmcl-minor-version*
+                      #+ppc64-target 64
+                      #-ppc64-target nil)
    #+lispworks (lisp-implementation-version)
    #+allegro   (concatenate 'string (if (eq 'h 'H) "A" "M")     ;  
ANSI vs MoDeRn
-                           excl::*common-lisp-version-number*)
+                           excl::*common-lisp-version-number*
+			   #+64bit "-64")
    #+clisp     (let ((s (lisp-implementation-version)))
(Continue reading)

Gary King | 7 Aug 16:47 2006

Removing some allegro warnings

The patch below wraps #'excl:without-redefinition-warnings around a  
number of forms that cause allegro to complain... Any comments?

Index: swank-allegro.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-allegro.lisp,v
retrieving revision 1.89
diff -u -w -r1.89 swank-allegro.lisp
--- swank-allegro.lisp	28 Jul 2006 15:04:53 -0000	1.89
+++ swank-allegro.lisp	7 Aug 2006 14:32:44 -0000
 <at>  <at>  -28,8 +28,9  <at>  <at> 
;;;; TCP Server
+(excl:without-redefinition-warnings
(defimplementation preferred-communication-style ()
-  :spawn)
+    :spawn))
(defimplementation create-socket (host port)
    (socket:make-socket :connect :passive :local-port port
 <at>  <at>  -64,40 +65,48  <at>  <at> 
    (setf (stream-external-format stream)
          (find-external-format external-format)))
+(excl:without-redefinition-warnings
(defimplementation format-sldb-condition (c)
-  (princ-to-string c))
+    (princ-to-string c)))
+(excl:without-redefinition-warnings
(defimplementation condition-references (c)
    (declare (ignore c))
-  '())
+    '()))
(Continue reading)

Martin Simmons | 7 Aug 18:25 2006

Re: minor patch to

>>>>> On Mon, 7 Aug 2006 10:46:11 -0400, Gary King said:
> Delivered-To: slime-devel <at> common-lisp.net
> 
> The patch below alters the lisp-version-string to accommodate 64 bit  
> Allegro and 64 bit OpenMCL.
> 
> Any comments...

Maybe it would be better to handle this by *architecture-features*?

-- 
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/

> 
> Index: swank-loader.lisp
> ===================================================================
> RCS file: /project/slime/cvsroot/slime/swank-loader.lisp,v
> retrieving revision 1.59
> diff -u -w -r1.59 swank-loader.lisp
> --- swank-loader.lisp	13 Apr 2006 10:41:59 -0000	1.59
> +++ swank-loader.lisp	7 Aug 2006 14:30:26 -0000
>  <at>  <at>  -66,12 +66,15  <at>  <at> 
>     #+scl       (lisp-implementation-version)
>     #+sbcl      (lisp-implementation-version)
>     #+ecl       (lisp-implementation-version)
> -  #+openmcl   (format nil "~d.~d"
> +  #+openmcl   (format nil "~d.~d~ <at> [-~d~]"
>                         ccl::*openmcl-major-version*
(Continue reading)

Gary King | 7 Aug 20:25 2006

Re: minor patch to

Hi Martin,

My understanding is that *architecture-features* tells me about the  
processor but that since I can still run 32-bit lisps on a 64-bit  
processor, I need to add this additional test to differentiate a home  
directory...

Yes? No?

On Aug 7, 2006, at 12:25 PM, Martin Simmons wrote:

>>>>>> On Mon, 7 Aug 2006 10:46:11 -0400, Gary King said:
>> Delivered-To: slime-devel <at> common-lisp.net
>>
>> The patch below alters the lisp-version-string to accommodate 64 bit
>> Allegro and 64 bit OpenMCL.
>>
>> Any comments...
>
> Maybe it would be better to handle this by *architecture-features*?
>
> -- 
> Martin Simmons
> LispWorks Ltd
> http://www.lispworks.com/
>
>
>>
>> Index: swank-loader.lisp
>> ===================================================================
(Continue reading)


Gmane