[slime-cvs] CVS slime
mkoeppe
mkoeppe at common-lisp.net
Mon Feb 20 08:03:44 UTC 2006
Update of /project/slime/cvsroot/slime
In directory common-lisp:/tmp/cvs-serv22629
Modified Files:
slime.el
Log Message:
(slime-expand-abbreviations-and-complete): Scroll the completions
buffer if the TAB key is pressed another time, like Emacs minibuffer
completion does.
--- /project/slime/cvsroot/slime/slime.el 2006/02/18 13:42:38 1.583
+++ /project/slime/cvsroot/slime/slime.el 2006/02/20 08:03:44 1.584
@@ -5598,14 +5598,24 @@
(when (member completed-prefix completion-set)
(slime-minibuffer-respecting-message
"Complete but not unique"))
- (let ((unambiguous-completion-length
- (loop for c in completion-set
- minimizing (or (mismatch completed-prefix c)
- (length completed-prefix)))))
- (goto-char (+ beg unambiguous-completion-length))
- (slime-display-completion-list completion-set
- completed-prefix)
- (slime-complete-delay-restoration)))))))
+ (if (and (eq last-command this-command)
+ (slime-completion-window-active-p))
+ ;; Scroll the completions window only
+ (let ((window slime-completions-window))
+ (with-current-buffer (window-buffer window)
+ (if (pos-visible-in-window-p (point-max) window)
+ (set-window-start window (point-min) nil)
+ (let ((other-window-scroll-buffer
+ (window-buffer window)))
+ (scroll-other-window)))))
+ (let ((unambiguous-completion-length
+ (loop for c in completion-set
+ minimizing (or (mismatch completed-prefix c)
+ (length completed-prefix)))))
+ (goto-char (+ beg unambiguous-completion-length))
+ (slime-display-completion-list completion-set
+ completed-prefix)
+ (slime-complete-delay-restoration))))))))
(defun slime-complete-symbol*-fancy-bit ()
"Do fancy tricks after completing a symbol.
More information about the slime-cvs
mailing list