aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1996-12-05 19:52:46 +0000
committerKarl Heuer1996-12-05 19:52:46 +0000
commitfc21ed035b436427dff35a6b3417eaf7842d0cb2 (patch)
tree9e469a9e02ffa7bd02c156ae1285e0b89d928b1b
parent086eac130a00b5568be191a67a22bec65e89be94 (diff)
downloademacs-fc21ed035b436427dff35a6b3417eaf7842d0cb2.tar.gz
emacs-fc21ed035b436427dff35a6b3417eaf7842d0cb2.zip
(PC-do-completion): Remove text properties from
completions; also use string-equal instead of equal.
-rw-r--r--lisp/complete.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/complete.el b/lisp/complete.el
index bbba4fd129e..50855ebd804 100644
--- a/lisp/complete.el
+++ b/lisp/complete.el
@@ -409,7 +409,9 @@ of `minibuffer-completion-table' and the minibuffer contents.")
409 (setq p compl) 409 (setq p compl)
410 (while p 410 (while p
411 (and (string-match regex (car p)) 411 (and (string-match regex (car p))
412 (setq poss (cons (car p) poss))) 412 (progn
413 (set-text-properties 0 (length (car p)) '() (car p))
414 (setq poss (cons (car p) poss))))
413 (setq p (cdr p))))) 415 (setq p (cdr p)))))
414 416
415 ;; Now we have a list of possible completions 417 ;; Now we have a list of possible completions
@@ -463,7 +465,7 @@ of `minibuffer-completion-table' and the minibuffer contents.")
463 ;; Is the actual string one of the possible completions? 465 ;; Is the actual string one of the possible completions?
464 (setq p (and (not (eq mode 'help)) poss)) 466 (setq p (and (not (eq mode 'help)) poss))
465 (while (and p 467 (while (and p
466 (not (equal (car p) basestr))) 468 (not (string-equal (car p) basestr)))
467 (setq p (cdr p))) 469 (setq p (cdr p)))
468 (and p (null mode) 470 (and p (null mode)
469 (PC-temp-minibuffer-message " [Complete, but not unique]")) 471 (PC-temp-minibuffer-message " [Complete, but not unique]"))
@@ -507,8 +509,7 @@ of `minibuffer-completion-table' and the minibuffer contents.")
507 (delete-char 1) 509 (delete-char 1)
508 (setq end (1- end)))) 510 (setq end (1- end))))
509 (setq improved t)) 511 (setq improved t))
510 ;; Use format to discard text properties. 512 (insert (substring prefix i (1+ i)))
511 (insert (format "%s" (substring prefix i (1+ i))))
512 (setq end (1+ end))) 513 (setq end (1+ end)))
513 (setq i (1+ i))) 514 (setq i (1+ i)))
514 (or pt (equal (point) beg) 515 (or pt (equal (point) beg)