From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: obsolete comment in tool-bar.el Date: Tue, 12 Jul 2005 22:02:52 -0500 (CDT) Message-ID: <200507130302.j6D32qE05640@raven.dms.auburn.edu> References: <200507071915.j67JFZT29961@raven.dms.auburn.edu> <200507090235.j692ZER04883@raven.dms.auburn.edu> <200507110321.j6B3LgG09526@raven.dms.auburn.edu> <85y88dfcqw.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1121225640 1094 80.91.229.2 (13 Jul 2005 03:34:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2005 03:34:00 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 13 05:33:54 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DsY0I-0005b6-6B for ged-emacs-devel@m.gmane.org; Wed, 13 Jul 2005 05:33:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DsY1w-0005rN-Gf for ged-emacs-devel@m.gmane.org; Tue, 12 Jul 2005 23:35:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DsXrD-00061p-BM for emacs-devel@gnu.org; Tue, 12 Jul 2005 23:24:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DsXrA-00060C-TM for emacs-devel@gnu.org; Tue, 12 Jul 2005 23:24:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DsXqb-0005OL-27 for emacs-devel@gnu.org; Tue, 12 Jul 2005 23:23:45 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DsXeB-0003AP-Kv; Tue, 12 Jul 2005 23:10:55 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j6D32tCK029415; Tue, 12 Jul 2005 22:02:55 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j6D32qE05640; Tue, 12 Jul 2005 22:02:52 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rms@gnu.org In-reply-to: (rms@gnu.org) 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: news.gmane.org gmane.emacs.devel:40854 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40854 Richard Stallman wrote: I am not sure that method would work well, but maybe it would. However, sticking with the present approach is safer. We know it can't ignore errors for variables we did not intend that for. I agree. The alternative might, at the very least, require compiler defvars at many places. I propose to remove the useless autoload for tooltip-mode, which fixes one of the reported bugs, to apply the patch below to easy-mmode.el, which fixes the other reported bug and to reinstate custom-initialize-safe-default as the :initialize function for tooltip-mode and blink-cursor-mode, as well as to keep recommending the two new :initialize functions for use in similar cases. I could install all of that, if desired. Unfortunately, I can not reinstate the use of `custom-reevaluate-setting' for tooltip-mode in startup.el. Unless we would be willing to load tooltip.el even on systems where it makes no sense, we just have to live with the code duplication here. (That would also apply to other proposed solutions.) Here is the required patch to easy-mmode.el. Stefan opposed a similar patch earlier, but the objections he then stated (that loading a file would have side effects) do not apply to custom-initialize-safe-default. ===File ~/easy-mmode-diff=================================== *** easy-mmode.el 04 Jul 2005 12:44:35 -0500 1.67 --- easy-mmode.el 12 Jul 2005 21:14:49 -0500 *************** *** 142,147 **** --- 142,148 ---- (let* ((mode-name (symbol-name mode)) (pretty-name (easy-mmode-pretty-mode-name mode lighter)) (globalp nil) + (initialize nil) (group nil) (extra-args nil) (extra-keywords nil) *************** *** 159,164 **** --- 160,166 ---- (:lighter (setq lighter (pop body))) (:global (setq globalp (pop body))) (:extra-args (setq extra-args (pop body))) + (:initialize (setq initialize (list :initialize (pop body)))) (:group (setq group (nconc group (list :group (pop body))))) (:require (setq require (pop body))) (:keymap (setq keymap (pop body))) *************** *** 167,172 **** --- 169,178 ---- (setq keymap-sym (if (and keymap (symbolp keymap)) keymap (intern (concat mode-name "-map")))) + (unless initialize + (setq initialize + '(:initialize 'custom-initialize-default))) + (unless group ;; We might as well provide a best-guess default group. (setq group *************** *** 196,202 **** `(defcustom ,mode ,init-value ,(format base-doc-string pretty-name mode mode) :set 'custom-set-minor-mode ! :initialize 'custom-initialize-default ,@group :type 'boolean ,@(cond --- 202,208 ---- `(defcustom ,mode ,init-value ,(format base-doc-string pretty-name mode mode) :set 'custom-set-minor-mode ! ,@initialize ,@group :type 'boolean ,@(cond ============================================================