emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: partial-completion-mode and mouse selection


From: Glenn Morris
Subject: Re: partial-completion-mode and mouse selection
Date: Thu, 22 Mar 2007 17:56:33 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

A Soare wrote:

>  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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]