From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#9661: 24.0.90; language-info-custom-alist defcustom Date: Mon, 03 Oct 2011 13:23:09 +0200 Message-ID: <877h4mz5cy.fsf@escher.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1317641043 15101 80.91.229.12 (3 Oct 2011 11:24:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 Oct 2011 11:24:03 +0000 (UTC) To: 9661@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 03 13:23:59 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RAgck-0001eH-V5 for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Oct 2011 13:23:55 +0200 Original-Received: from localhost ([::1]:53818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAgck-00084q-EX for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Oct 2011 07:23:54 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:38488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAgcb-0007ci-BO for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2011 07:23:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAgcX-00043e-9l for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2011 07:23:45 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAgcX-00043W-4U for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2011 07:23:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RAgdr-0004lP-Nk for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2011 07:25:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Oct 2011 11:25:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9661 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.131764108718277 (code B ref -1); Mon, 03 Oct 2011 11:25:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Oct 2011 11:24:47 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RAgdX-0004kg-I0 for submit@debbugs.gnu.org; Mon, 03 Oct 2011 07:24:47 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RAgdR-0004kW-RR for submit@debbugs.gnu.org; Mon, 03 Oct 2011 07:24:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAgc3-00040Q-3C for submit@debbugs.gnu.org; Mon, 03 Oct 2011 07:23:15 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:41826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAgc2-00040M-Ua for submit@debbugs.gnu.org; Mon, 03 Oct 2011 07:23:11 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:38361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAgby-0006kR-V7 for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2011 07:23:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAgbv-0003zg-24 for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2011 07:23:06 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:33679) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RAgbu-0003zR-IS for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2011 07:23:02 -0400 Original-Received: (qmail invoked by alias); 03 Oct 2011 11:23:00 -0000 Original-Received: from i59F55C43.versanet.de (EHLO escher.home) [89.245.92.67] by mail.gmx.net (mp025) with SMTP; 03 Oct 2011 13:23:00 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1/1+PA0A3319AkVuY4jV9bZRZ3mZqJTuQJ0MXtS3Y tZX11iQA6zB7zP Original-Received: by escher.home (Postfix, from userid 1000) id EE8E8230ED; Mon, 3 Oct 2011 13:23:09 +0200 (CEST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 03 Oct 2011 07:25:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:52106 Archived-At: In GNU Emacs 24.0.90.2 (i686-suse-linux-gnu, GTK+ Version 2.22.1) of 2011-10-03 on escher Windowing system distributor `The X.Org Foundation', version 11.0.10903000 configured using `configure '--without-toolkit-scroll-bars' 'CFLAGS=-g'' 1. emacs -Q 2. M-x customize-option RET language-info-custom-alist RET. 3. Click or hit RET on the INS button to open up the customization widgets. 4. Move the cursor to the first editable field, labelled "Language environment". 5. Type ESC TAB, which should pop up a list of completions; instead: => An error is signalled: "completion--some: Invalid function: (apply-partially (function completion-table-case-fold) language-info-alist)" The same error occurs on typing ESC TAB in the editable field associated with the key "input-method". In the other editable fields, however, completion works. I believe the errors are due to the use of the :completions keyword on the string widget in the defcustom code of language-info-custom-alist. If I understand the source in the wid-edit library, the string widget does not support this keyword. One way to fix this is to define new widgets in the string class that have suitable values for :completions; the patch below does this. Since these widgets are specific to the mule API the patch puts them into mule-cmds.el (like e.g. the definition of the charset widget). It would probably be better to have a more general and modular solution, but I leave that to the widget gurus. *** /data/steve/bzr/emacs/trunk/lisp/international/mule-cmds.el 2011-09-17 14:20:08.000000000 +0200 --- /data/steve/bzr/emacs/quickfixes/lisp/international/mule-cmds.el 2011-10-03 13:15:21.000000000 +0200 *************** *** 1891,1896 **** --- 1891,1906 ---- widget)) :prompt-history 'charset-history) + (define-widget 'language-environment-string 'string + "String widget with completion for language environment." + :completions (apply-partially #'completion-table-case-fold + language-info-alist)) + + (define-widget 'input-method-string 'string + "String widget with completion for input method." + :completions (apply-partially #'completion-table-case-fold + input-method-alist)) + (defcustom language-info-custom-alist nil "Customizations of language environment parameters. Value is an alist with elements like those of `language-info-alist'. *************** *** 1915,1924 **** ;; re-set the environment in case its parameters changed (set-language-environment current-language-environment))) :type `(alist ! :key-type (string :tag "Language environment" ! :completions ! (apply-partially #'completion-table-case-fold ! language-info-alist)) :value-type (alist :key-type symbol :options ((documentation string) --- 1925,1932 ---- ;; re-set the environment in case its parameters changed (set-language-environment current-language-environment))) :type `(alist ! :key-type (language-environment-string ! :tag "Language environment") :value-type (alist :key-type symbol :options ((documentation string) *************** *** 1930,1939 **** (coding-priority (repeat coding-system)) (nonascii-translation charset) (input-method ! (string ! :completions ! (apply-partially #'completion-table-case-fold ! input-method-alist) :prompt-history input-method-history)) (features (repeat symbol)) (unibyte-display coding-system))))) --- 1938,1944 ---- (coding-priority (repeat coding-system)) (nonascii-translation charset) (input-method ! (input-method-string :prompt-history input-method-history)) (features (repeat symbol)) (unibyte-display coding-system)))))