diff lisp/complete.el @ 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 e62d2121822f
children 8548cb8ad6e2
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