*** complete.el Tue Jan 23 07:40:00 2007 --- complete.el Sat Feb 24 20:46:14 2007 *************** *** 383,388 **** --- 383,393 ---- (let ((completion-ignore-case nil)) (test-completion str table pred)))) + (defun try-completion-old (string alist &optional predicate) + "Like `try-completion' but return empty string instead of t." + (let ((result (try-completion string alist predicate))) + (if (eq result t) "" result))) + (defun PC-do-completion (&optional mode beg end) (or beg (setq beg (minibuffer-prompt-end))) (or end (setq end (point-max))) *************** *** 390,396 **** (pred minibuffer-completion-predicate) (filename (funcall PC-completion-as-file-name-predicate)) (dirname nil) ; non-nil only if a filename is being completed ! (dirlength 0) (str (buffer-substring beg end)) (incname (and filename (string-match "<\\([^\"<>]*\\)>?$" str))) (ambig nil) --- 395,401 ---- (pred minibuffer-completion-predicate) (filename (funcall PC-completion-as-file-name-predicate)) (dirname nil) ; non-nil only if a filename is being completed ! dirlength (str (buffer-substring beg end)) (incname (and filename (string-match "<\\([^\"<>]*\\)>?$" str))) (ambig nil) *************** *** 623,630 **** ;; Check if next few letters are the same in all cases (if (and (not (eq mode 'help)) ! (setq prefix (try-completion (PC-chunk-after basestr skip) ! poss))) (let ((first t) i) ;; Retain capitalization of user input even if ;; completion-ignore-case is set. --- 628,635 ---- ;; Check if next few letters are the same in all cases (if (and (not (eq mode 'help)) ! (setq prefix (try-completion-old ! (PC-chunk-after basestr skip) poss))) (let ((first t) i) ;; Retain capitalization of user input even if ;; completion-ignore-case is set. *************** *** 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 --- 667,673 ---- (setq skip (concat skip (regexp-quote prefix) PC-ndelims-regex) ! prefix (try-completion-old (PC-chunk-after ;; not basestr, because that does ;; not reflect insertions *************** *** 996,1002 **** (cond ((not completion-table) nil) ((eq action 'lambda) (test-completion str2 completion-table nil)) ! ((eq action nil) (try-completion str2 completion-table nil)) ((eq action t) (all-completions str2 completion-table nil))))) ad-do-it)) --- 1001,1007 ---- (cond ((not completion-table) nil) ((eq action 'lambda) (test-completion str2 completion-table nil)) ! ((eq action nil) (try-completion-old str2 completion-table nil)) ((eq action t) (all-completions str2 completion-table nil))))) ad-do-it))