From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Re: utf-translate-cjk only settable via Customize Date: Sun, 23 Mar 2003 11:56:42 +0100 Organization: University of Duisburg, Germany Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <84he9uqrkl.fsf@lucy.is.informatik.uni-duisburg.de> References: <84zno3b7jy.fsf@lucy.is.informatik.uni-duisburg.de> <84of4aw0hw.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1048417142 28089 80.91.224.249 (23 Mar 2003 10:59:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 23 Mar 2003 10:59:02 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Mar 23 11:59:01 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18x3Bt-0007Iv-00 for ; Sun, 23 Mar 2003 11:59:01 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18x3EY-00027L-00 for ; Sun, 23 Mar 2003 12:01:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18x3BF-0000v8-03 for emacs-devel@quimby.gnus.org; Sun, 23 Mar 2003 05:58:21 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18x3A5-0008Qp-00 for emacs-devel@gnu.org; Sun, 23 Mar 2003 05:57:09 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18x3A3-0008Mj-00 for emacs-devel@gnu.org; Sun, 23 Mar 2003 05:57:07 -0500 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18x3A0-0008DY-00 for emacs-devel@gnu.org; Sun, 23 Mar 2003 05:57:04 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18x39o-0007Dt-00 for ; Sun, 23 Mar 2003 11:56:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18x39o-0007Dk-00 for ; Sun, 23 Mar 2003 11:56:52 +0100 Original-Lines: 36 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:v1oTvDMDp98wcaXjCpQPxkp60XQ= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12546 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12546 Richard Stallman writes: > It ought to be easy to augment define-minor-mode to grok more keyword > args. But is this the right approach? Do we want a > :extra-defcustom-args thing that contains a list of those additional > args to defcustom? > > Would you please explain what you are trying to achieve? > I don't see what purpose any of this would serve. The variable utf-translate-cjk must be set via Customize to achieve the desired effect. Stefan suggested to make a minor mode such that people can just invoke that via Lisp and don't have to use Customize. I was following this discussion and looked at define-minor-mode to do that. So I wanted to replace the current (defcustom utf-translate-cjk ...) statement with a (define-minor-mode utf-translate-cjk-mode ...) statement. The defcustom for utf-translate-cjk contains several keyword args: :set, :version, :type, :set-after, and :group. define-minor-mode is a macro that expands to a defcustom statement. I couldn't see how to inject the :version and :set-after keywords into the defcustom statement generated by define-minor-mode. Of course, I could also do it manually, as follows: * Change the :set arg for the current defcustom utf-translate-cjk to invoke utf-translate-cjk-mode, instead of the current code. * Write a new function utf-translate-cjk-mode that does what the current lambda expression for :set does. But what's the point of a convenience macro like define-minor-mode when I circumvent it? -- A preposition is not a good thing to end a sentence with.