aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2007-03-10 08:39:11 +0000
committerMartin Rudalics2007-03-10 08:39:11 +0000
commita7b52a1e76037c97ca5f5cbee41f87ce6e6fc80d (patch)
tree78bc8529b70dd24292973b62ab124a91c9840ef8
parent5bc21f358c94be373e23c7ab6f2dcce7d5b67baf (diff)
downloademacs-a7b52a1e76037c97ca5f5cbee41f87ce6e6fc80d.tar.gz
emacs-a7b52a1e76037c97ca5f5cbee41f87ce6e6fc80d.zip
(PC-do-completion): Bind dirlength to nil to avoid
that buffer contents get erased during completion.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/complete.el5
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3d04960ffdc..2029538256b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12007-03-10 Martin Rudalics <rudalics@gmx.at>
2
3 * complete.el (PC-do-completion): Bind dirlength to nil to avoid
4 that buffer contents get erased during completion.
5
12007-03-10 Glenn Morris <rgm@gnu.org> 62007-03-10 Glenn Morris <rgm@gnu.org>
2 7
3 * woman.el (woman-change-fonts): Add a hack to deal with 8 * woman.el (woman-change-fonts): Add a hack to deal with
diff --git a/lisp/complete.el b/lisp/complete.el
index 104f3789403..ce5094d1aef 100644
--- a/lisp/complete.el
+++ b/lisp/complete.el
@@ -417,7 +417,10 @@ of `minibuffer-completion-table' and the minibuffer contents.")
417 (pred minibuffer-completion-predicate) 417 (pred minibuffer-completion-predicate)
418 (filename (funcall PC-completion-as-file-name-predicate)) 418 (filename (funcall PC-completion-as-file-name-predicate))
419 (dirname nil) ; non-nil only if a filename is being completed 419 (dirname nil) ; non-nil only if a filename is being completed
420 (dirlength 0) 420 ;; The following used to be "(dirlength 0)" which caused the erasure of
421 ;; the entire buffer text before `point' when inserting a completion
422 ;; into a buffer.
423 dirlength
421 (str (buffer-substring beg end)) 424 (str (buffer-substring beg end))
422 (incname (and filename (string-match "<\\([^\"<>]*\\)>?$" str))) 425 (incname (and filename (string-match "<\\([^\"<>]*\\)>?$" str)))
423 (ambig nil) 426 (ambig nil)