(PC-do-completion): Bind dirlength to nil to avoid

that buffer contents get erased during completion.
This commit is contained in:
Martin Rudalics
2007-03-10 08:39:11 +00:00
parent 5bc21f358c
commit a7b52a1e76
2 changed files with 9 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2007-03-10 Martin Rudalics <rudalics@gmx.at>
* complete.el (PC-do-completion): Bind dirlength to nil to avoid
that buffer contents get erased during completion.
2007-03-10 Glenn Morris <rgm@gnu.org>
* woman.el (woman-change-fonts): Add a hack to deal with

View File

@@ -417,7 +417,10 @@ of `minibuffer-completion-table' and the minibuffer contents.")
(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)