Glenn Morris wrote: > Glenn Morris wrote: > >> The 1+ part fixes a different bug that seems to be present in 21.4 >> as well. > > Whoops, no it doesn't. I don't use partial completion, but it seems to > be pretty broken when one selects completion from a list.
This patch seems to do better, but is pretty much just trial-and-error. *** complete.el 03 Mar 2007 15:51:14 -0800 1.59 --- complete.el 03 Mar 2007 16:36:13 -0800 *************** *** 617,623 **** ;; If ambiguous, try for a partial completion (let ((improved nil) ! prefix (pt nil) (skip "\\`")) --- 617,623 ---- ;; If ambiguous, try for a partial completion (let ((improved nil) ! prefix temp (pt nil) (skip "\\`")) *************** *** 662,668 **** (setq skip (concat skip (regexp-quote prefix) PC-ndelims-regex) ! prefix (try-completion (PC-chunk-after ;; not basestr, because that does ;; not reflect insertions --- 662,668 ---- (setq skip (concat skip (regexp-quote prefix) PC-ndelims-regex) ! temp (try-completion (PC-chunk-after ;; not basestr, because that does ;; not reflect insertions *************** *** 674,679 **** --- 674,680 ---- (when (string-match skip x) (substring x (match-end 0)))) poss))) + (if (stringp temp) (setq prefix temp)) (or (> i 0) (> (length prefix) 0)) (or (not (eq mode 'word)) (and first (> (length prefix) 0) *************** *** 709,715 **** ;; Record which part of the buffer we are completing ;; so that choosing a completion from the list ;; knows how much old text to replace. ! (setq completion-base-size dirlength))) (PC-temp-minibuffer-message " [Next char not unique]")) nil))))) --- 710,716 ---- ;; Record which part of the buffer we are completing ;; so that choosing a completion from the list ;; knows how much old text to replace. ! (setq completion-base-size (1- beg)))) (PC-temp-minibuffer-message " [Next char not unique]")) nil))))) _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug