From xemacs-m  Thu Jul 10 02:42:27 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id CAA27958
	for <xemacs-beta@xemacs.org>; Thu, 10 Jul 1997 02:42:26 -0500 (CDT)
Received: (from hniksic@localhost)
	by jagor.srce.hr (8.8.6/8.8.6) id JAA14823;
	Thu, 10 Jul 1997 09:42:25 +0200 (MET DST)
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Re: hide-ifdef again
References: <199707100516.BAA24011@spacely.icd.teradyne.com> <kig3epn4fzw.fsf@jagor.srce.hr> <m267uj74yl.fsf@altair.xemacs.org>
X-Attribution: Hrv
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 10 Jul 1997 09:42:24 +0200
In-Reply-To: Steven L Baur's message of "10 Jul 1997 00:15:46 -0700"
Message-ID: <kigwwmzz733.fsf@jagor.srce.hr>
Lines: 46
X-Mailer: Gnus v5.4.59/XEmacs 20.3(beta12) - "Helsinki"

Steven L Baur <steve@xemacs.org> writes:

> >  ;;;###autoload
> > -(add-minor-mode 'hide-ifdef-mode " Ifdef" 'hide-ifdef-mode-map)
> > +(add-minor-mode 'hide-ifdef-mode " Ifdef" hide-ifdef-mode-map)
>  
> There are two problems with this one line patch.  Problem number one
> is that hide-ifdef-mode-map is not an autoload, so putting this code
> into the autoloads is going to blow chunks at XEmacs dump time (void
> variable hide-ifdef-mode-map).

You are right.  The whole statement shouldn't be autoloaded at all,
IMO.

> The second problem is that follow mode uses code identical to my
> second patch.

I don't know what follow mode is, and if it works.  Other minor modes
seem to use the keymap here (not the symbol pointing to a keymap), and 
my patch certainly does fix hide-ifdef-mode.

I think you should apply my patch, and remove the ;;;###autoload,
additionally.

1997-07-10  Hrvoje Niksic  <hniksic@srce.hr>

	* modes/hideif.el: Correctly specify minor mode map.
	Don't autoload the minor-mode specification.

--- lisp/modes/hideif.el.orig	Thu Jul 10 09:40:54 1997
+++ lisp/modes/hideif.el	Thu Jul 10 09:41:33 1997
@@ -168,7 +168,7 @@
 ;          (cons '(hide-ifdef-mode " Ifdef")
 ;                minor-mode-alist)))
 ;; XEmacs: do it right.
-;;;###autoload
+;;;don't ###autoload because of startup code doesn't define the map
 (add-minor-mode 'hide-ifdef-mode " Ifdef" hide-ifdef-mode-map)
 
 ;; fix c-mode syntax table so we can recognize whole symbols.


-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
"Psychos _do not_ explode when sunlight hits them."

