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: file-name-shadow-mode Date: Sat, 19 Mar 2005 20:14:41 -0600 (CST) Message-ID: <200503200214.j2K2Efh03044@raven.dms.auburn.edu> References: <200503180435.j2I4Z2R18621@raven.dms.auburn.edu> <87is3p5zp2.fsf-monnier+emacs@gnu.org> <200503191521.j2JFL8901509@raven.dms.auburn.edu> <87r7ibziw6.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1111285835 24519 80.91.229.2 (20 Mar 2005 02:30:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 20 Mar 2005 02:30:35 +0000 (UTC) Cc: snogglethorpe@gmail.com, emacs-devel@gnu.org, rms@gnu.org, miles@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 20 03:30:34 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DCqD1-0000cX-F6 for ged-emacs-devel@m.gmane.org; Sun, 20 Mar 2005 03:30:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DCqTp-0003Q4-HV for ged-emacs-devel@m.gmane.org; Sat, 19 Mar 2005 21:47:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DCqRx-0002ii-Ix for emacs-devel@gnu.org; Sat, 19 Mar 2005 21:45:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DCqRc-0002b0-AY for emacs-devel@gnu.org; Sat, 19 Mar 2005 21:45:39 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DCqRa-0002Wz-FC for emacs-devel@gnu.org; Sat, 19 Mar 2005 21:45:34 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DCpyG-0000yp-UG; Sat, 19 Mar 2005 21:15:17 -0500 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 j2K2FF9N023183; Sat, 19 Mar 2005 20:15:15 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j2K2Efh03044; Sat, 19 Mar 2005 20:14:41 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: monnier@iro.umontreal.ca In-reply-to: <87r7ibziw6.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Sat, 19 Mar 2005 11:45:36 -0500) 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34805 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34805 Stefan Monnier wrote: > Apparently, this gives no compiler warnings (I checked), even though the > function uses the mode variable, which is, in the new version, not > yet defcustomed. I'd be surprised if it doesn't introduce spurious warnings at various places. I indeed did not look closely enough (it did not produce warnings for file-name-shadow-mode during bootstrapping). This problem could be easily circumvented by a compiler defvar for the mode variable at the beginning of the define-minor-mode expansion. Otherwise, setting :initialize to something else but `custom-initialize-default' is probably not going to work for minor modes defined with `define-minor-mode'. (It definitely does not work with the current code.) One would then have to enable such minor modes in startup.el. The best way to do that would probably be with `custom-reevaluate-setting', since that way any changes to the defcustom automatically take effect in startup.el too. Sincerely, Luc.