From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Finding faces to customize Date: Sat, 02 Jul 2005 03:05:59 +0300 Organization: JURTA Message-ID: <87k6ka6n53.fsf@jurta.org> References: <42BEEE4F.8080709@student.lu.se> <8764w0pu61.fsf@jurta.org> <42BF4DAE.9020309@student.lu.se> <87mzpbnsu8.fsf@jurta.org> <87oe9pooh1.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1120274819 24659 80.91.229.2 (2 Jul 2005 03:26:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 2 Jul 2005 03:26:59 +0000 (UTC) Cc: lennart.borgman.073@student.lu.se, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 02 05:26:51 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DoYeY-0001GR-Is for ged-emacs-devel@m.gmane.org; Sat, 02 Jul 2005 05:26:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DoYn8-0005WX-94 for ged-emacs-devel@m.gmane.org; Fri, 01 Jul 2005 23:35:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DoYje-0003fv-Kd for emacs-devel@gnu.org; Fri, 01 Jul 2005 23:32:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DoYgy-0002fq-CM for emacs-devel@gnu.org; Fri, 01 Jul 2005 23:29:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DoYgm-0002Y9-4u for emacs-devel@gnu.org; Fri, 01 Jul 2005 23:29:08 -0400 Original-Received: from [194.126.101.98] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DoYOI-0003Dw-38; Fri, 01 Jul 2005 23:10:02 -0400 Original-Received: from mail.neti.ee (80-235-37-19-dsl.mus.estpak.ee [80.235.37.19]) by Relayhost2.neti.ee (Postfix) with ESMTP id E37802695; Sat, 2 Jul 2005 06:04:34 +0300 (EEST) Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Fri, 01 Jul 2005 00:03:51 -0400") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee 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:40080 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40080 > I fixed these bugs in crm.el. Thanks. There are still three more bugs. Typing TAB with no more completions moves point into the read-only area. This happens, for example, after evaluating (completing-read-multiple "Prompt: " '(("hi") ("there"))) and typing `h TAB TAB'. The second bug doesn't allow RET without input string to return an empty string ("") when `require-match' arg is t, like `completing-read' does. The third bug occurs when trying to exit the minibuffer with RET. It signals an error " [An element did not match]" even for a valid completion. This patch should fix all three bugs: Index: lisp/emacs-lisp/crm.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/crm.el,v retrieving revision 1.6 diff -c -r1.6 crm.el *** lisp/emacs-lisp/crm.el 1 Jul 2005 01:10:42 -0000 1.6 --- lisp/emacs-lisp/crm.el 2 Jul 2005 00:05:27 -0000 *************** *** 214,220 **** (progn ;; (setq crm-beginning-of-element (match-beginning 1)) ! (setq crm-end-of-element end-index) ;; string to the left of the current element (setq crm-left-of-element (substring target-string 0 (match-beginning 1))) --- 214,220 ---- (progn ;; (setq crm-beginning-of-element (match-beginning 1)) ! (setq crm-end-of-element (+ end-index prompt-end)) ;; string to the left of the current element (setq crm-left-of-element (substring target-string 0 (match-beginning 1))) *************** *** 482,488 **** (setq result (catch 'crm-exit ! (if (eq (point-min) (point-max)) (throw 'crm-exit t)) ;; TODO: this test is suspect? --- 482,488 ---- (setq result (catch 'crm-exit ! (if (eq (minibuffer-prompt-end) (point-max)) (throw 'crm-exit t)) ;; TODO: this test is suspect? *************** *** 508,514 **** nil (if (equal result "check") (let ((check-strings ! (crm-strings-completed-p (buffer-string)))) ;; check all of minibuffer (if (eq check-strings t) (throw 'exit nil) --- 508,515 ---- nil (if (equal result "check") (let ((check-strings ! (crm-strings-completed-p ! (buffer-substring (minibuffer-prompt-end) (point-max))))) ;; check all of minibuffer (if (eq check-strings t) (throw 'exit nil) -- Juri Linkov http://www.jurta.org/emacs/