From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.bugs Subject: Re: Bad value in file-coding-system-alist Date: Tue, 10 Jul 2007 15:05:37 +0900 Organization: Emacsen advocacy group Message-ID: References: <468BCE38.20402@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1184047565 12857 80.91.229.12 (10 Jul 2007 06:06:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 10 Jul 2007 06:06:05 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: "Lennart Borgman \(gmail\)" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 10 08:06:02 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I88rJ-0007n5-MI for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Jul 2007 08:06:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I88rI-000379-TT for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Jul 2007 02:06:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I88rG-000373-HF for bug-gnu-emacs@gnu.org; Tue, 10 Jul 2007 02:05:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I88rF-00036r-PK for bug-gnu-emacs@gnu.org; Tue, 10 Jul 2007 02:05:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I88rF-00036o-L1 for bug-gnu-emacs@gnu.org; Tue, 10 Jul 2007 02:05:57 -0400 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I88rF-0006pS-5K for bug-gnu-emacs@gnu.org; Tue, 10 Jul 2007 02:05:57 -0400 Original-Received: from [66.225.201.151] (helo=mail.jpl.org) by orlando.hostforweb.net with esmtpa (Exim 4.63) (envelope-from ) id 1I88rA-0004xL-1R; Tue, 10 Jul 2007 01:05:52 -0500 X-Hashcash: 1:20:070710:lennart.borgman@gmail.com::SIdGYCWmnQhkG/Ev:0000000000000000000000000000000000005JdR X-Hashcash: 1:20:070710:bug-gnu-emacs@gnu.org::tLhGXsWLQRtO1kyt:0000000000000000000000000000000000000000B2hs X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:zmyo7NS1a6sf8ftkYNUemgxLaXk= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-detected-kernel: Genre and OS details not recognized. X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16121 Archived-At: >>>>> Lennart Borgman (gmail) wrote: > Are you sure this is the right fix? Is not this a general problem with > Custom? >> *** cus-start.el~ Thu Apr 12 03:05:31 2007 >> --- cus-start.el Mon Jul 9 01:33:47 2007 [...] >> ! (coding-system >> ! :tag "Single coding system" >> ! :value undecided >> ! :match (lambda (widget value) >> ! (and value (not (functionp value))))) Do you think the `coding-system' widget defined in wid-edit.el should test whether the value is a coding system? If so, is it really harmless? If it is done, we cannot use a coding system that is defined afterward for the default value of an option for example. Eval the following form and try customizing the `foo-coding-system' variable. --8<---------------cut here---------------start------------->8--- (require 'wid-edit) (plist-put (cdr (get 'coding-system 'widget-type)) :match (lambda (widget value) (coding-system-p value))) (defcustom foo-coding-system 'bar "doc" :type 'coding-system) --8<---------------cut here---------------end--------------->8--- You will see that the value appears with the sexp form because of the `mismatch' error. I think restricting too much is not a good idea. Or is this not what you'd like to say?