Index: slime.el =================================================================== RCS file: /project/slime/cvsroot/slime/slime.el,v retrieving revision 1.194 diff -u -u -r1.194 slime.el --- slime.el 20 Jan 2004 23:53:13 -0000 1.194 +++ slime.el 21 Jan 2004 00:39:22 -0000 @@ -3187,6 +3187,21 @@ (with-output-to-temp-buffer "*Completions*" (display-completion-list completion-set)) (slime-complete-delay-restoration))))))) + + +(defmacro without-minibuffer-prompt (&rest body) + "Narrow minibuffer excluding the prompt, then execute BODY." + (if (fboundp 'minibuffer-prompt-end) + `(save-restriction + (narrow-to-region (minibuffer-prompt-end) (point-max)) + ,@body) + `(progn ,@body))) + +(defun slime-minibuffer-complete-symbol () + "Run SLIME-COMPLETE-SYMBOL within minibuffer." + (interactive) + (without-minibuffer-prompt + (slime-complete-symbol))) (defun slime-minibuffer-respecting-message (format &rest format-args) "Display TEXT as a message, without hiding any minibuffer contents." @@ -3202,8 +3217,8 @@ (set-keymap-parent slime-read-expression-map minibuffer-local-map) -(define-key slime-read-expression-map "\t" 'slime-complete-symbol) -(define-key slime-read-expression-map "\M-\t" 'slime-complete-symbol) +(define-key slime-read-expression-map "\t" 'slime-minibuffer-complete-symbol) +(define-key slime-read-expression-map "\M-\t" 'slime-minibuffer-complete-symbol) (defvar slime-read-expression-history '() "History list of expressions read from the minibuffer.")