--- slime-repl.el.~1.52.~ 2010-09-26 14:10:33.000000000 -0400 +++ slime-repl.el 2011-01-22 18:56:02.876713429 -0500 @@ -1191,25 +1191,32 @@ (defvar slime-repl-shortcut-table nil "A list of slime-repl-shortcuts") -(defvar slime-repl-shortcut-history '() +(defvar slime-repl-shortcut-history '("?") "History list of shortcut command names.") (defvar slime-within-repl-shortcut-handler-p nil "Bound to T if we're in a REPL shortcut handler invoked from the REPL.") +(defun slime-complete-repl-shortcuts () + (let* ((new-local-map (copy-keymap minibuffer-local-completion-map)) + (minibuffer-local-completion-map new-local-map) + (overriding-local-map minibuffer-local-completion-map)) + (define-key new-local-map "?" (function (lambda () (interactive) (insert 63)))) + (slime-lookup-shortcut + (completing-read "Slime REPL shortcut: " + (slime-bogus-completion-alist + (slime-list-all-repl-shortcuts)) + nil t nil + 'slime-repl-shortcut-history)))) + (defun slime-handle-repl-shortcut () (interactive) (if (> (point) slime-repl-input-start-mark) (insert (string slime-repl-shortcut-dispatch-char)) - (let ((shortcut (slime-lookup-shortcut - (completing-read "Command: " - (slime-bogus-completion-alist - (slime-list-all-repl-shortcuts)) - nil t nil - 'slime-repl-shortcut-history)))) - (with-struct (slime-repl-shortcut. handler) shortcut - (let ((slime-within-repl-shortcut-handler-p t)) - (call-interactively handler)))))) + (let ((shortcut (slime-complete-repl-shortcuts))) + (with-struct (slime-repl-shortcut. handler) shortcut + (let ((slime-within-repl-shortcut-handler-p t)) + (call-interactively handler)))))) (defun slime-list-all-repl-shortcuts () (loop for shortcut in slime-repl-shortcut-table