From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Newsgroups: gmane.emacs.devel Subject: Re: Getting more info on a variable in Customize buffers Date: Tue, 04 Jan 2005 09:13:26 -0500 Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1104848129 23065 80.91.229.6 (4 Jan 2005 14:15:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Jan 2005 14:15:29 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 04 15:15:15 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ClpSs-0003SA-00 for ; Tue, 04 Jan 2005 15:15:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Clpe3-0007Vs-RR for ged-emacs-devel@m.gmane.org; Tue, 04 Jan 2005 09:26:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Clpdw-0007Vm-AR for emacs-devel@gnu.org; Tue, 04 Jan 2005 09:26:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Clpdv-0007Va-TO for emacs-devel@gnu.org; Tue, 04 Jan 2005 09:26:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Clpdv-0007VX-Qd for emacs-devel@gnu.org; Tue, 04 Jan 2005 09:26:39 -0500 Original-Received: from [206.47.199.163] (helo=simmts5-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ClpR9-0004ws-MX for emacs-devel@gnu.org; Tue, 04 Jan 2005 09:13:27 -0500 Original-Received: from empanada.home ([67.71.119.166]) by simmts5-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050104141327.NZYO1614.simmts5-srv.bellnexxia.net@empanada.home>; Tue, 4 Jan 2005 09:13:27 -0500 Original-Received: by empanada.home (Postfix, from userid 502) id 99C893CE17B; Tue, 4 Jan 2005 09:13:26 -0500 (EST) Original-To: emacs-devel@gnu.org In-Reply-To: (Per Abrahamsen's message of "Tue, 04 Jan 2005 10:24:51 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (darwin) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:31821 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:31821 >>> I probably don't fully understand, although I think I follow you. Sounds >>> like an implementation problem to me - or perhaps a design problem? >> >> The designer might call it a feature rather than a problem. >> >> I do tend to think that it was a mistake to design something that looks like >> an elisp variable and which happens to be an elisp variable in 99% of the >> cases but which may be something else. > I kind of agree, I always thought there instead would be many more > "defsomething". > The :get, :set and :init were, if I remember right, introduced by > XEmacs people for use with specifiers. And since I didn't really care > about XEmacs (and certainly didn't understood specifiers to write a > defspecifier) I let them have their way. Interesting. And good to hear. > And when it was there, it also got (ab)used in Emacs for minor modes. > It should have been part of a define-minor-mode instead, but as I > remember there already is was one of those. We now have a proper `define-minor-mode' (which internally uses :set but I guess that's OK). > There also is a patch floating around here to overload defcustom for > keymaps as well. Again, I can't come up with a good API for a > "defkeymap", and wouldn't find the time to implement it anyway. I remember trying to introduce `defkeymap' but there wasn't much support for it (it was a long time ago, way before the keymap-custom hack appeared). Most/all keymaps are defined as something similar to: (defvar foo-map (let ((map (make-sparse-keymap))) (define-key map X1 Y1) (define-key map X2 Y2) (define-key map X3 Y3) (substitute-key-definition X4 Y4 map global-map) map)) so I suggested (defkeymap foo-map '((X1 Y1) (X2 Y2) (X3 Y3) (X4 Y4))) with some additional options like :inherit and :suppress. What it does w.r.t Custom can then be adjusted as you please and improved over time. Stefan