diff options
author | Karl Heuer <kwzh@gnu.org> | 1996-12-05 19:52:46 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1996-12-05 19:52:46 +0000 |
commit | 392c2ab158ef1ae30156081afae0e4f36d5351bf (patch) | |
tree | c9300e24dbab714ccb2876b7e9b5d8a710c2545f | |
parent | 2c76a6d2791c8959055f8ccc82614b5441e5dbf8 (diff) | |
download | emacs-392c2ab158ef1ae30156081afae0e4f36d5351bf.tar.gz |
(PC-do-completion): Remove text properties from
completions; also use string-equal instead of equal.
-rw-r--r-- | lisp/complete.el | 9 |
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.") (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 @@ of `minibuffer-completion-table' and the minibuffer contents.") ;; 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 @@ of `minibuffer-completion-table' and the minibuffer contents.") (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) |