[slime-devel] Re: fuzzy completion patch again

Attila Lendvai attila.lendvai at gmail.com
Wed Oct 4 09:38:05 UTC 2006


>
> > i'm sending this patch in the hopes that someone with more elisp
> experience
> > will review the diff and apply it to the cvs.
>
> Hmm, i applied your patch to my local copy and it really broke things:
>
> - Emacs snapshot doesn't like the "<TAB>" keybindings (should be
>    "\t").


these are the things that need attention by more experienced emacs gurus.
thanks for the report!

- Pressing the tab key in the repl does open the completition window and
>    i'm able to navigate with "up"/"down", but selecting a completition
>    with "enter"/"return" seems to send an "enter" to the repl. With
>    paredit activated this causes havoc since the form most likely isn't
>    completed yet.


this is the default behaviour and this is actually a feature. enter and
space are rebound while in completion mode so that they insert the selected
completion, end the completion mode and trigger the original action mapped
to the key.

i have these extra stuff in my init.el:

;; so that they behave as space and enter described above
(define-key slime-target-buffer-fuzzy-completions-map (kbd "]")
'slime-fuzzy-select-and-process-event-in-target-buffer)
(define-key slime-target-buffer-fuzzy-completions-map (kbd "[")
'slime-fuzzy-select-and-process-event-in-target-buffer)

;; enable the fuzzy completion
(define-lisp-key "\t" 'slime-fuzzy-indent-and-complete-symbol nil t)
;; unrelated ielm completion
(define-lisp-key "\t" (lambda ()
                        (interactive)
                        (ielm-complete-symbol)) nil nil t)

and for reference:

(defun define-lisp-key (key binding &optional except-repl cl-only el-only)
  (unless el-only (define-key slime-mode-map key binding))
  (unless cl-only (define-key emacs-lisp-mode-map key binding))
  (unless except-repl
    (unless el-only (define-key slime-repl-mode-map key binding))
    (unless cl-only (define-key ielm-map key binding))))

-- 
- attila

"- The truth is that I've been too considerate, and so became
unintentionally cruel...
- I understand.
- No, you don't understand! We don't speak the same language!"
(Ingmar Bergman - Smultronstället)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20061004/917118ab/attachment.html>


More information about the slime-devel mailing list