changeset 16608:e2858bcbed43

(PC-do-completion): Remove text properties from completions; also use string-equal instead of equal.
author Karl Heuer <kwzh@gnu.org>
date Thu, 05 Dec 1996 19:52:46 +0000
parents 16b8d910795f
children 21c4e4e580a9
files lisp/complete.el
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/complete.el	Wed Dec 04 10:57:01 1996 +0000
+++ b/lisp/complete.el	Thu Dec 05 19:52:46 1996 +0000
@@ -409,7 +409,9 @@
 	  (setq p compl)
 	  (while p
 	    (and (string-match regex (car p))
-		 (setq poss (cons (car p) poss)))
+		 (progn
+		   (set-text-properties 0 (length (car p)) '() (car p))
+		   (setq poss (cons (car p) poss))))
 	    (setq p (cdr p)))))
 
       ;; Now we have a list of possible completions
@@ -463,7 +465,7 @@
 	;; Is the actual string one of the possible completions?
 	(setq p (and (not (eq mode 'help)) poss))
 	(while (and p
-		    (not (equal (car p) basestr)))
+		    (not (string-equal (car p) basestr)))
 	  (setq p (cdr p)))
 	(and p (null mode)
 	     (PC-temp-minibuffer-message " [Complete, but not unique]"))
@@ -507,8 +509,7 @@
 					     (delete-char 1)
 					     (setq end (1- end))))
 				      (setq improved t))
-				    ;; Use format to discard text properties.
-				    (insert (format "%s" (substring prefix i (1+ i))))
+				    (insert (substring prefix i (1+ i)))
 				    (setq end (1+ end)))
 				  (setq i (1+ i)))
 				(or pt (equal (point) beg)