changeset 77211:43c40e825164

(PC-goto-end, PC-do-completion-end): Make buffer-local.
author Glenn Morris <rgm@gnu.org>
date Sat, 14 Apr 2007 20:23:31 +0000
parents d83335a3519d
children 5e1b6a63ac46
files lisp/complete.el
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/complete.el	Sat Apr 14 20:23:01 2007 +0000
+++ b/lisp/complete.el	Sat Apr 14 20:23:31 2007 +0000
@@ -190,10 +190,14 @@
 (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 @@
                     (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 @@
                           ;; 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)))))