(minibuffer-complete-and-exit): Use it.
Fixes: debbugs:114
2011-10-17 Stefan Monnier <monnier@iro.umontreal.ca>
+ * minibuffer.el (completion--replace): Inherit surrounding properties
+ (bug#114).
+ (minibuffer-complete-and-exit): Use it.
+
* comint.el (comint--table-subvert): Quote the all-completions output
(bug#9160).
(setq end (- end suffix-len))
(setq newtext (substring newtext 0 (- suffix-len))))
(goto-char beg)
- (insert newtext)
+ (insert-and-inherit newtext)
(delete-region (point) (+ (point) (- end beg)))
(forward-char suffix-len)))
;; file, so `try-completion' actually completes to
;; that file.
(= (length string) (length compl)))
- (goto-char end)
- (insert compl)
- (delete-region beg end))))
+ (completion--replace beg end compl))))
(exit-minibuffer))
((memq minibuffer-completion-confirm '(confirm confirm-after-completion))