From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: [bojohan+mail@dd.chalmers.se: Partial completion] Date: Sat, 24 Feb 2007 20:52:59 +0100 Message-ID: <45E0979B.2020006@gmx.at> References: <17888.10288.446902.230637@kahikatea.snap.net.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070402050403060009060801" X-Trace: sea.gmane.org 1172347032 3247 80.91.229.12 (24 Feb 2007 19:57:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 24 Feb 2007 19:57:12 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Nick Roberts Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 24 20:57:05 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HL30x-0007aZ-P5 for ged-emacs-devel@m.gmane.org; Sat, 24 Feb 2007 20:57:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HL30x-00073L-KG for ged-emacs-devel@m.gmane.org; Sat, 24 Feb 2007 14:57:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HL30i-00072A-Q4 for emacs-devel@gnu.org; Sat, 24 Feb 2007 14:56:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HL30h-00071S-Fv for emacs-devel@gnu.org; Sat, 24 Feb 2007 14:56:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HL30g-00071E-VR for emacs-devel@gnu.org; Sat, 24 Feb 2007 14:56:47 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.52) id 1HL30f-0001OJ-MW for emacs-devel@gnu.org; Sat, 24 Feb 2007 14:56:46 -0500 Original-Received: (qmail invoked by alias); 24 Feb 2007 19:56:44 -0000 X-Provags-ID: V01U2FsdGVkX19Xt+wviwdXc8DKaE/zlfN44iMN8+7+9rHFnB4whD 3gaA== User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <17888.10288.446902.230637@kahikatea.snap.net.nz> X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:66753 Archived-At: This is a multi-part message in MIME format. --------------070402050403060009060801 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Please try the attached patch instead. It's simpler and should take care of the remaining problems. --------------070402050403060009060801 Content-Type: text/plain; name="complete.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="complete.diff" *** 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))) +=20 (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-ta= ble nil)) ! ((eq action nil) (try-completion str2 completion-table n= il)) ((eq action t) (all-completions str2 completion-table ni= l))))) ad-do-it)) =0C --- 1001,1007 ---- (cond ((not completion-table) nil) ((eq action 'lambda) (test-completion str2 completion-ta= ble nil)) ! ((eq action nil) (try-completion-old str2 completion-tab= le nil)) ((eq action t) (all-completions str2 completion-table ni= l))))) ad-do-it)) =0C --------------070402050403060009060801 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --------------070402050403060009060801--