Mercurial > emacs
changeset 76439:2a096eef08d4
(PC-do-completion): Bind dirlength to nil to avoid
that buffer contents get erased during completion.
author | Martin Rudalics <rudalics@gmx.at> |
---|---|
date | Sat, 10 Mar 2007 08:37:51 +0000 |
parents | c6ac3e0be713 |
children | cb3777590346 |
files | lisp/complete.el |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/complete.el Sat Mar 10 06:26:03 2007 +0000 +++ b/lisp/complete.el Sat Mar 10 08:37:51 2007 +0000 @@ -417,7 +417,10 @@ (pred minibuffer-completion-predicate) (filename (funcall PC-completion-as-file-name-predicate)) (dirname nil) ; non-nil only if a filename is being completed - (dirlength 0) + ;; The following used to be "(dirlength 0)" which caused the erasure of + ;; the entire buffer text before `point' when inserting a completion + ;; into a buffer. + dirlength (str (buffer-substring beg end)) (incname (and filename (string-match "<\\([^\"<>]*\\)>?$" str))) (ambig nil)