outline minor mode

Jeff Mincy jeff at delphioutpost.com
Thu Jul 22 10:09:48 EDT 2010


   From: Michael Sperber <sperber at deinprogramm.de>
   Date: Thu, 22 Jul 2010 13:31:37 +0200
   
   jeff-xemacs at delphioutpost.com writes:
   
   > This rewrite has completely broken minor-mode.   In my .emacs I used
   > to do the following:
   >
   >   (defun emacs-lisp-outline-minor-mode ()
   >     ;; Swiped from bottom of essd-sp6.el
   >     (outline-minor-mode)
   >     (setq outline-regexp "\^L\\|\\`;\\|;;\\*\\|;;;\\*\\|(def[cvu]\\|(setq\\|;;;;\\*"))
   >   (add-hook 'emacs-lisp-mode-hook 'emacs-lisp-outline-minor-mode t)
   >
   > With the new outline.el, the above emacs-lisp-outline-minor-mode
   > trashes XEmacs after opening a emacs-lisp file.  After a emacs-lisp
   > file is opened I get 'Wrong type argument: stringp, nil' after doing
   > almost any command or partial commands such as just M-x.  The error is
   > pretty much debug proof.  debug-on-error does not seem to work to get
   > a backtrace.
   >
   > Can you confirm this error and perhaps suggest some way
   > to debug the code?
   
   I don't see it - could you send me a sample Emacs Lisp file where it
   fails for you, just to ensure we're on the same page?

As far as I can tell the problem happens for all emacs-lisp files
including empty emacs-lisp files.

touch fubar.el
xemacs -vanilla (21.4.18)
eval the defun and add-hook in the new vanilla xemacs and open the
empty emacs-lisp file:
C-x C-f fubar.el
M-x == 'Wrong type argument: stringp, nil'

I stepped through outline-minor-mode.   The problem comes from this
hook added to change-major-mode-hook:
         (add-hook
             'change-major-mode-hook
             (function (lambda nil (outline-minor-mode -1)))
             nil
             t)
This code turns M-x into 'Wrong type argument: stringp, nil' I
don't know anything about this hook and what it has to do with M-x.
Maybe it does something to the minibuffer, since any command that
uses the minibuffer to prompt gets the error.  Anyway, evaling 
 (pop change-major-mode-hook)
makes the problem stop.

   Moreover, could you try this with 21.5?
   
21.5 was pretty bad the last time I tried it.  I've pretty much
forgotten the details so maybe I'm ready to try 21.5 again at some point.
It won't be anytime soon.

-jeff



More information about the XEmacs-Beta mailing list