summaryrefslogtreecommitdiff
path: root/lisp/complete.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/complete.el')
-rw-r--r--lisp/complete.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/complete.el b/lisp/complete.el
index b93202b2894..b1bb36f9dfa 100644
--- a/lisp/complete.el
+++ b/lisp/complete.el
@@ -190,10 +190,14 @@ If nil, means use the colon-separated path in the variable $INCPATH instead."
(defvar PC-do-completion-end nil
"Internal variable used by `PC-do-completion'.")
+(make-variable-buffer-local 'PC-do-completion-end)
+
(defvar PC-goto-end nil
"Internal variable set in `PC-do-completion', used in
`choose-completion-string-functions'.")
+(make-variable-buffer-local 'PC-goto-end)
+
;;;###autoload
(define-minor-mode partial-completion-mode
"Toggle Partial Completion mode.
@@ -768,6 +772,8 @@ GOTO-END is non-nil, however, it instead replaces up to END."
(let ((prompt-end (minibuffer-prompt-end)))
(with-output-to-temp-buffer "*Completions*"
(display-completion-list (sort helpposs 'string-lessp))
+ (setq PC-do-completion-end end
+ PC-goto-end goto-end)
(with-current-buffer standard-output
;; Record which part of the buffer we are completing
;; so that choosing a completion from the list
@@ -786,9 +792,7 @@ GOTO-END is non-nil, however, it instead replaces up to END."
;; plays around with point.
(setq completion-base-size (if dirname
dirlength
- (- beg prompt-end))
- PC-do-completion-end end
- PC-goto-end goto-end))))
+ (- beg prompt-end))))))
(PC-temp-minibuffer-message " [Next char not unique]"))
nil)))))