[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: partial-completion-mode and mouse selection
From: |
A Soare |
Subject: |
Re: partial-completion-mode and mouse selection |
Date: |
Fri, 23 Mar 2007 13:57:46 +0100 (CET) |
> > 1. partial completion mode started.
> >
> > 2. M-:
> >
> > Eval: (n-f <M-TAB>
> >
> > Select using left mouse button one choice.
>
> This bug report is still somewhat vague, but I see your point.
>
> Please test how the following patch affects partial completion in
> general.
>
>
> *** complete.el 21 Mar 2007 19:23:12 -0000 1.67
> --- complete.el 22 Mar 2007 21:53:28 -0000
> ***************
> *** 743,755 ****
> (and completion-auto-help
> (eq last-command this-command))
> (eq mode 'help))
> (with-output-to-temp-buffer "*Completions*"
> (display-completion-list (sort helpposs 'string-lessp))
> (with-current-buffer standard-output
> ;; Record which part of the buffer we are completing
> ;; so that choosing a completion from the list
> ;; knows how much old text to replace.
> ! (setq completion-base-size dirlength)))
> (PC-temp-minibuffer-message " [Next char not unique]"))
> nil)))))
>
> --- 743,758 ----
> (and completion-auto-help
> (eq last-command this-command))
> (eq mode 'help))
> + (let ((width (minibuffer-prompt-width)))
> (with-output-to-temp-buffer "*Completions*"
> (display-completion-list (sort helpposs
> 'string-lessp))
> (with-current-buffer standard-output
> ;; Record which part of the buffer we are completing
> ;; so that choosing a completion from the list
> ;; knows how much old text to replace.
> ! (setq completion-base-size (if dirname
> ! dirlength
> ! (- beg 1 width))))))
> (PC-temp-minibuffer-message " [Next char not unique]"))
> nil)))))
>
> ***************
> *** 799,804 ****
> --- 802,808 ----
> (setq quit-flag nil
> unread-command-events '(7))))))))
>
> + (defvar PC-lisp-complete-end nil)
>
> (defun PC-lisp-complete-symbol ()
> "Perform completion on Lisp symbol preceding point.
> ***************
> *** 825,831 ****
> (or (boundp sym) (fboundp sym)
> (symbol-plist sym))))))
> (PC-not-minibuffer t))
> ! (PC-do-completion nil beg end)))
>
> (defun PC-complete-as-file-name ()
> "Perform completion on file names preceding point.
> --- 829,838 ----
> (or (boundp sym) (fboundp sym)
> (symbol-plist sym))))))
> (PC-not-minibuffer t))
> ! (if (equal last-command 'PC-lisp-complete-symbol)
> ! (PC-do-completion nil beg PC-lisp-complete-end)
> ! (setq PC-lisp-complete-end (point-marker))
> ! (PC-do-completion nil beg end))))
>
> (defun PC-complete-as-file-name ()
> "Perform completion on file names preceding point.
>
>
>
I have just installed to me and checked this patch on a few examples, and it
works well for them.
So it seems to be good for the bug reported.
Alin Soare.