[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Wendland Gerolf
Subject: easy-mmode.el
Date: Wed, 25 Apr 2001 10:55:56 +0200

Hi Georges,

When I write

; line A
(easy-mmode-define-minor-mode xxx nil nil " XXX")

and then try to switch it on, I get an error message
Symbol's value as variable is void: xxx-mode

When I write 
; line B
(easy-mmode-define-minor-mode xxx-mode nil nil " XXX")
instead, then everything's ok.

If, after I've used line B at least once, I revert to
the first variant, no error occurs. 

The Problem is:

The buffer-local mode variable is named xxx (or, to be
more precise <symbol-name> independently on whether 
it ends in -mode or not) when line A
is evaluated. 

But the mode toggle looks for a variable
named xxx-mode (<symbol-name> if it ends in -mode, or
<symbol-name>-mode if it does not end in -mode). 
If line B has been evaluated at least once, then the
correct variable is already present, thus obscuring
the error.

Version information (for both system that I currently use,
and which show the erroneous behaviour):

GNU Emacs 20.4.1 (sparc-sun-solaris2.6, X toolkit) of Tue May 23 2000 on neptun
GNU Emacs 20.6.1 (i386-*-nt4.0.1381) of Tue Feb 29 2000 on buffy

I can't suggest a code-fix because I'm not at all familiar
with elisp macros.  


reply via email to

[Prev in Thread] Current Thread [Next in Thread]