From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: Custom dependencies Date: Tue, 08 Apr 2003 14:35:50 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200304081835.h38IZoFI029294@rum.cs.yale.edu> References: <8465pvpnhy.fsf@lucy.is.informatik.uni-duisburg.de> <200304041519.h34FJa9n007445@rum.cs.yale.edu> <84wui5xi52.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 1049827089 24702 80.91.224.249 (8 Apr 2003 18:38:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 8 Apr 2003 18:38:09 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Apr 08 20:38:08 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 192xye-0006OR-00 for ; Tue, 08 Apr 2003 20:37:48 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 192y2l-0000Sw-00 for ; Tue, 08 Apr 2003 20:42:03 +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 192xyG-0004wL-06 for emacs-devel@quimby.gnus.org; Tue, 08 Apr 2003 14:37:24 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 192xxi-0004UD-00 for emacs-devel@gnu.org; Tue, 08 Apr 2003 14:36:50 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 192xww-0003Lm-00 for emacs-devel@gnu.org; Tue, 08 Apr 2003 14:36:03 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 192xwl-00032r-00 for emacs-devel@gnu.org; Tue, 08 Apr 2003 14:35:51 -0400 Original-Received: from rum.cs.yale.edu (localhost [127.0.0.1]) by rum.cs.yale.edu (8.12.8/8.12.8) with ESMTP id h38IZox6029296; Tue, 8 Apr 2003 14:35:50 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.12.8/8.12.8/Submit) id h38IZoFI029294; Tue, 8 Apr 2003 14:35:50 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: kai.grossjohann@gmx.net (Kai =?iso-8859-1?q?Gro=DFjohann?=) 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:13036 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13036 > 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. No need for a "global search": you just need to do (push 'A (get 'B 'custom-reset-after-update)) when evaluating A's defcustom. > 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. (utf-translate-cjk-mode 1) might also begin by clearing the hash-table. Some minor modes try to optimize the case where "the mode was already ON", but I think it's generally cleaner and more robust not to try and be clever. Stefan