Commit 96a8a0df authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/minibuffer.el (completion--replace): Inherit surrounding properties.

(minibuffer-complete-and-exit): Use it.

Fixes: debbugs:114
parent 8b79f3e0
2011-10-17 Stefan Monnier <monnier@iro.umontreal.ca> 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 * comint.el (comint--table-subvert): Quote the all-completions output
(bug#9160). (bug#9160).
......
...@@ -596,7 +596,7 @@ Moves point to the end of the new text." ...@@ -596,7 +596,7 @@ Moves point to the end of the new text."
(setq end (- end suffix-len)) (setq end (- end suffix-len))
(setq newtext (substring newtext 0 (- suffix-len)))) (setq newtext (substring newtext 0 (- suffix-len))))
(goto-char beg) (goto-char beg)
(insert newtext) (insert-and-inherit newtext)
(delete-region (point) (+ (point) (- end beg))) (delete-region (point) (+ (point) (- end beg)))
(forward-char suffix-len))) (forward-char suffix-len)))
...@@ -927,9 +927,7 @@ If `minibuffer-completion-confirm' is `confirm-after-completion', ...@@ -927,9 +927,7 @@ If `minibuffer-completion-confirm' is `confirm-after-completion',
;; file, so `try-completion' actually completes to ;; file, so `try-completion' actually completes to
;; that file. ;; that file.
(= (length string) (length compl))) (= (length string) (length compl)))
(goto-char end) (completion--replace beg end compl))))
(insert compl)
(delete-region beg end))))
(exit-minibuffer)) (exit-minibuffer))
((memq minibuffer-completion-confirm '(confirm confirm-after-completion)) ((memq minibuffer-completion-confirm '(confirm confirm-after-completion))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment