[slime-devel] swank-listener-hooks fix, paredit-friendly REPL patch

Knut Olav Bøhmer knut-olav.bohmer at telenor.com
Sun Nov 9 22:56:38 UTC 2008


Michael Weber wrote:
> On Oct 31, 2008, at 10:01 , Knut Olav Bøhmer wrote:
>
>   
>> How I fixed that in my slime.el is that I added t to slime-repl- 
>> current-input
>>
>> -         (let ((str (slime-repl-current-input)))
>> +         (let ((str (slime-repl-current-input t)))
>>     
>
> Same here, works for me since quite a while now.
>   
it does not work for me in in slime-current-2008-11-09
It is becauce of slime-presentations.el

Here is the fix:

(defun slime-presentation-current-input (&optional until-point-p)
  "Return the current input as string.
The input is the region from after the last prompt to the end of
buffer. Presentations of old results are expanded into code."
  (slime-buffer-substring-with-reified-output  slime-repl-input-start-mark
-                         (point-max)))
+                           (if until-point-p
+                           (point)
+                           (point-max))))


I have another paredit improvment. When tab-completing files I get an 
extra " on the end of the filename.

(defun slime-maybe-complete-as-filename ()
  "If point is at a string starting with \", complete it as filename.
Return nil iff if point is not at filename."
  (if (save-excursion (re-search-backward "\"[^ \t\n]+\\=" nil t))
-      (let ((comint-completion-addsuffix '("/" . "\"")))
+      (let ((comint-completion-addsuffix '("/" . "")))
        (if slime-when-complete-filename-expand
            (comint-replace-by-expanded-filename)
          (comint-dynamic-complete-as-filename))
        t)
    nil))

But this time I realy think it should be dependent on if you have 
paredit or not.
It removes the anoying extra " when you tab-complete filenames.










More information about the slime-devel mailing list