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: Thu, 17 Mar 2005 22:35:03 -0600 (CST) Message-ID: <200503180435.j2I4Z2R18621@raven.dms.auburn.edu> References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1111120832 1523 80.91.229.2 (18 Mar 2005 04:40:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 Mar 2005 04:40:32 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 18 05:40:28 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DC9HR-0006SF-Pc for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2005 05:40:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DC9Xr-0007kU-N0 for ged-emacs-devel@m.gmane.org; Thu, 17 Mar 2005 23:57:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DC9X9-0007YM-FQ for emacs-devel@gnu.org; Thu, 17 Mar 2005 23:56:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DC9Wu-0007Tx-9A for emacs-devel@gnu.org; Thu, 17 Mar 2005 23:56:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DC9Wt-0007Rk-Ns for emacs-devel@gnu.org; Thu, 17 Mar 2005 23:56:11 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DC9D1-0002xy-OT; Thu, 17 Mar 2005 23:35:39 -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 j2I4ZV9N013667; Thu, 17 Mar 2005 22:35:31 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j2I4Z2R18621; Thu, 17 Mar 2005 22:35:03 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: snogglethorpe@gmail.com, miles@gnu.org In-reply-to: (message from Miles Bader on Fri, 18 Mar 2005 10:59:02 +0900) 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:34699 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34699 Miles Bader wrote: > Seemingly, this has not happened yet. I think the discussion petered > off after somebody asked how one could actually auto-enable some minor > mode. That was me... Does anyone have a quick answer to that question? I believe that the reason you have problems is that define-minor-mode uses `custom-initialize-default' as the Custom :initialize function. That is correct if you want the minor mode disabled by default, but not if you want it enabled by default. Then you need to use `custom-initialize-set'. Passing an explicit :initialize keyword to `define-minor-mode' does not seem to help: it gets ignored. I believe that `define-minor-mode' should use `custom-initialize-set' as the :initialize function if :init-value is non-nil. Then the patches below would work. _Currently they do not._ An alternate patch that does work right now is to call `custom-reevaluate-setting' in startup.el, but to me, that seems ugly. ===File ~/src-Makefile.in-diff============================== *** Makefile.in 30 Nov 2004 16:57:14 -0600 1.307 --- Makefile.in 17 Mar 2005 20:58:22 -0600 *************** *** 779,784 **** --- 779,785 ---- ${lispsource}emacs-lisp/timer.elc \ ${lispsource}vc-hooks.elc \ ${lispsource}ediff-hook.elc \ + ${lispsource}rfn-eshadow.elc \ VMS_SUPPORT \ MSDOS_SUPPORT \ WINNT_SUPPORT \ *************** *** 870,875 **** --- 871,877 ---- ../lisp/emacs-lisp/timer.elc \ ../lisp/vc-hooks.elc \ ../lisp/ediff-hook.elc \ + ../lisp/rfn-eshadow.elc \ ../lisp/widget.elc \ ../lisp/window.elc \ ../lisp/version.el ============================================================ ===File ~/loadup-diff======================================= *** loadup.el 27 Dec 2004 15:02:07 -0600 1.135 --- loadup.el 17 Mar 2005 21:50:40 -0600 *************** *** 192,197 **** --- 192,198 ---- (load "vc-hooks") (load "ediff-hook") + (load "rfn-eshadow") (message "%s" (garbage-collect)) ;If you want additional libraries to be preloaded and their ============================================================ ===File ~/rfn-eshadow-diff================================== *** rfn-eshadow.el 02 Sep 2003 07:36:02 -0500 1.12 --- rfn-eshadow.el 17 Mar 2005 21:45:48 -0600 *************** *** 207,212 **** --- 207,214 ---- With prefix argument ARG, turn on if positive, otherwise off. Returns non-nil if the new state is enabled." :global t + :init-value t :group 'minibuffer (if file-name-shadow-mode ;; Enable the mode ============================================================