summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2007-04-14 20:23:31 +0000
committerGlenn Morris <rgm@gnu.org>2007-04-14 20:23:31 +0000
commite00c1b9caea53df8ac242029d4513c24b9b28d7e (patch)
tree918ec93e8a4ab4bb8b3d86eb4325de8832fc021f
parent031199c77cb23a890afb9a178fb0caa12b7a2930 (diff)
downloademacs-e00c1b9caea53df8ac242029d4513c24b9b28d7e.tar.gz
(PC-goto-end, PC-do-completion-end): Make buffer-local.
-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)))))