]> code.delx.au - gnu-emacs/blobdiff - lisp/minibuffer.el
Merge from emacs-23
[gnu-emacs] / lisp / minibuffer.el
index 2612dfd672cf6c5d9ad1590b03314eb76b5b84e6..0275dc1923b5ce9fe6599f4e5907b73b42e1aca9 100644 (file)
@@ -42,7 +42,7 @@
 ;;   provide the start info but not the end info in
 ;;   completion-base-position.
 ;; - quoting is problematic.  E.g. the double-dollar quoting used in
-;;   substitie-in-file-name (and hence read-file-name-internal) bumps
+;;   substitute-in-file-name (and hence read-file-name-internal) bumps
 ;;   into various bugs:
 ;; - choose-completion doesn't know how to quote the text it inserts.
 ;;   E.g. it fails to double the dollars in file-name completion, or
@@ -1133,6 +1133,7 @@ variables.")
   (interactive)
   (message "Making completion list...")
   (lexical-let* ((start (field-beginning))
+                 (end (field-end))
                 (string (field-string))
                 (completions (completion-all-completions
                               string
@@ -1164,10 +1165,12 @@ variables.")
                             completions)))
             (with-current-buffer standard-output
               (set (make-local-variable 'completion-base-position)
-                   ;; FIXME: We should provide the END part as well, but
-                   ;; currently completion-all-completions does not give
-                   ;; us the necessary information.
-                   (list (+ start base-size) nil)))
+                   (list (+ start base-size)
+                         ;; FIXME: We should pay attention to completion
+                         ;; boundaries here, but currently
+                         ;; completion-all-completions does not give us the
+                         ;; necessary information.
+                         end)))
             (display-completion-list completions)))
 
       ;; If there are no completions, or if the current input is already the