From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@gmx.net (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Re: Custom dependencies Date: Tue, 08 Apr 2003 14:56:09 +0200 Organization: University of Duisburg, Germany Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <84wui5xi52.fsf@lucy.is.informatik.uni-duisburg.de> References: <8465pvpnhy.fsf@lucy.is.informatik.uni-duisburg.de> <200304041519.h34FJa9n007445@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1049806833 23625 80.91.224.249 (8 Apr 2003 13:00:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 8 Apr 2003 13:00:33 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Apr 08 15:00:25 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 192shm-00067V-00 for ; Tue, 08 Apr 2003 15:00:02 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 192slm-0005Xp-00 for ; Tue, 08 Apr 2003 15:04:10 +0200 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 192sgh-0003eD-05 for emacs-devel@quimby.gnus.org; Tue, 08 Apr 2003 08:58:55 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 192sgD-0003Iv-00 for emacs-devel@gnu.org; Tue, 08 Apr 2003 08:58:25 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 192sg2-0003C5-00 for emacs-devel@gnu.org; Tue, 08 Apr 2003 08:58:15 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 192sg0-00036A-00 for emacs-devel@gnu.org; Tue, 08 Apr 2003 08:58:12 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 192sfW-0005bQ-00 for ; Tue, 08 Apr 2003 14:57:42 +0200 Mail-Followup-To: emacs-devel@gnu.org 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 192sfS-0005ac-00 for ; Tue, 08 Apr 2003 14:57:38 +0200 Original-Lines: 53 Original-X-Complaints-To: usenet@main.gmane.org Mail-Copies-To: never User-Agent: Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:m+L5qHZvH0Up6VdvW7Ai/UOKDzk= 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:13024 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13024 Dave Love writes: > "Stefan Monnier" writes: > >> - The case as above where variable A has a non-trivial :set function >> which depends on variable B, so that when B is changed something >> should be done to A. >> It seems that the :set-after thingy is a good way to specify the >> dependency, but it doesn't describe what should be done to A >> when B changes. > > I think it does. A should be re-set from its current value, since > something it depends on has changed. Are there cases in which that > would be wrong? So, let's see. We have (defcustom A ... :set-after '(B) ... :set ...something.long.here...). And Dave suggests to call the :set function from A after B has changed. So whenever a variable X is changed, we have to look through all other variables Y to see if they mention X in the :set-after list. >> Kai suggests turn A off and back on, but you seem object to it. > > I don't remember that, and it's not anything I thought I was objecting > to. It's not a question of off and on in this case anyhow -- the > state that changes is the contents of a hash table. My thinking was as follows: (utf-translate-cjk-mode -1) clears the hash table so that CJK unification is not done. A subsequent (utf-translate-cjk-mode 1) statement would then look at current-language-environment and populate the hash table accordingly. Of course, it is better to just populate the hash table in the right way, without clearing it first. >> I believe that you object only to >> set-language-environment doing it, not to the off&on thing: it >> should be done by custom without set-language-environment >> (or current-language-environment for that matter) knowing anything >> about utf-translate-cjk-mode. > > Yes, if I understand correctly. So to look through all variables Y to see if their :set-after list mentions X, and if so, to call the :set function? That's a good idea. (It would be nice to be able to do without the (custom-set-variables ...) block that's now used by Customize, because of the conditionals I mentioned.) -- A preposition is not a good thing to end a sentence with.