From xemacs-m  Fri May 30 10:02:59 1997
Received: from mail.cis.ohio-state.edu (mail.cis.ohio-state.edu [164.107.8.55])
	by xemacs.org (8.8.5/8.8.5) with SMTP id KAA27670
	for <xemacs-beta@xemacs.org>; Fri, 30 May 1997 10:02:58 -0500 (CDT)
Received: from calico.cis.ohio-state.edu (calico.cis.ohio-state.edu [164.107.142.11]) by mail.cis.ohio-state.edu (8.6.7/8.6.4) with ESMTP id LAA28565; Fri, 30 May 1997 11:02:35 -0400
Received: (ware@localhost) by calico.cis.ohio-state.edu (8.8.0/8.6.4) id LAA02710; Fri, 30 May 1997 11:02:34 -0400 (EDT)
To: xemacs-beta@xemacs.org
Subject: Questions about add-minor-mode
From: Pete Ware <ware@cis.ohio-state.edu>
Date: 30 May 1997 11:02:32 -0400
Message-ID: <vwm3er5huk7.fsf@calico.cis.ohio-state.edu>
Lines: 34
X-Mailer: Gnus v5.4.51/XEmacs 20.2(beta5)

I was working on getting modes/hideshow.el to work (patches in another
message) and ran into the following questions:

- Has anyone attempted to get add-minor-mode into GNU Emacs?  That was
  the only compatibility problem that wasn't transparent.  I ended up
  with the following code:

    (if (fboundp 'add-minor-mode)
	(progn
	  ;; XEmacs: need this for the change in add-minor-mode
	  ;; ### Why? -- pete@cis.ohio-state.edu
	  (fset 'hs-minor-mode-map hs-minor-mode-map)
	  (add-minor-mode 'hs-minor-mode " hs" 'hs-minor-mode-map))
      ;;else
      (or (assq 'hs-minor-mode minor-mode-map-alist)
	  (setq minor-mode-map-alist
		(cons (cons 'hs-minor-mode hs-minor-mode-map)
		      minor-mode-map-alist)))
      (or (assq 'hs-minor-mode minor-mode-alist)
	  (setq minor-mode-alist (append minor-mode-alist
					 (list '(hs-minor-mode " hs"))))))

- Also, what's with the line:

      (fset 'hs-minor-mode-map hs-minor-mode-map)

- Under XEmacs, the following code fragment existed:

    ;;;###autoload
    (add-minor-mode 'hs-minor-mode " hs" 'hs-minor-mode-map)

  How can I do something similar given the above conditional on fboundp?

--pete

