changeset 26341:6063383b77d5

(PC-do-completion): Use minibuffer-prompt-end to find the start of the text. Use field-string to read the user input.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 03 Nov 1999 23:49:57 +0000
parents f1ae5b57d9db
children e11b1d9aa80f
files lisp/complete.el
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/complete.el	Wed Nov 03 23:13:10 1999 +0000
+++ b/lisp/complete.el	Wed Nov 03 23:49:57 1999 +0000
@@ -370,7 +370,7 @@
 of `minibuffer-completion-table' and the minibuffer contents.")
 
 (defun PC-do-completion (&optional mode beg end)
-  (or beg (setq beg (point-min)))
+  (or beg (setq beg (minibuffer-prompt-end)))
   (or end (setq end (point-max)))
   (let* ((table minibuffer-completion-table)
 	 (pred minibuffer-completion-predicate)
@@ -646,7 +646,7 @@
 
 		  ;; We changed it... enough to be complete?
 		  (and (eq mode 'exit)
-		       (PC-is-complete-p (buffer-string) table pred))
+		       (PC-is-complete-p (field-string) table pred))
 
 		;; If totally ambiguous, display a list of completions
 		(if (or completion-auto-help