[Bug: 21.4.19] calendar 1.27 doesn't work with gnus

Jeff Miller jmiller
Wed Nov 15 22:58:54 EST 2006


Mike Kupfer writes:
 > ================================================================
 > Dear Jeff and Bug Team!
 > 
 > When I run the most recent stable gnus package (v1.90) with the v1.27
 > (pre-release) calendar package, I get this error:
 > 
 > Debugger entered--Lisp error: (error "No such face" mode-line-highlight)
--snip--
 >   call-interactively(execute-extended-command)

I'm unable to duplicate this, but I definitely believe you're seeing
it.   

 > The relevant function in gnus is:
 > 
 > (defun gnus-agent-make-mode-line-string (string mouse-button mouse-func)
 >   (if (and (fboundp 'propertize)
 > 	   (fboundp 'make-mode-line-mouse-map))
 >       (propertize string 'local-map
 > 		  (make-mode-line-mouse-map mouse-button mouse-func)
 > 		  'mouse-face 'mode-line-highlight)
 >     string))

I'm pretty sure I ran into this mode-line-highlight face doing the
calendar sync.   I substituted modeline-mousable for it, which is a
face defined in XEmacs.

As a quick fix I think you could just add something like this to your
init file, prior to any loading of gnus code.

(copy-face 'red 'mode-line-highlight)

I believe it will not have any effect on anything else, since the
XEmacs modeline doesn't understand text properties.   The idea is just
to define that face somehow, either by copying an existing face to it,
or via defface. 

 > With the v1.26 calendar, (fboundp 'make-mode-line-mouse-map) is nil and
 > gnus works okay.
 > 
 > I did some poking around in the v1.26 and v1.27 calendar packages, and
 > I'm somewhat confused.
 > 
 > There's this comment in the v1.26 calendar.el:
 > 
 >   ;; XEmacs - usage of propertize here is essentially a no-op.
 >   ;; xemacs doesn't support text properties in the mode-line.
 >   ;;
 >   (defvar calendar-mode-line-format
 >   (list
 >    (propertize (substitute-command-keys 
 >     "\\<calendar-mode-map>\\[scroll-calendar-left]")
 > 	       'help-echo "mouse-2: scroll left"
 > 	       )
 >   [...]
 > 
 > I also see this comment in calendar's defun of propertize:
 > 
 > ; propertize appeared in XEmacs subr.el r21-5-7: 1.26
 > [...]
 >   ;; `propertize' is a builtin in GNU Emacs 21.
 > 
 > So what *should* propertize be doing?  And should it be defined in
 > fsf-compat, rather than calendar?

Probably not, since it will shows up in 21.5.  Propertize is doing
just what it should be doing, adding text properties to a symbol.  

 > Also, does the gnus function above need changing?  Or is there something
 > about calendar and make-mode-line-mouse-map that needs fixing?

Well, what I'll probably end up doing is change calendar to use
cal-make-mode-line-mouse-map, since it's really one of my compatibility
functions that is polluting the name-space.  

In effect gnus is getting tricked in thinking it's being run in Emacs
because those 2 functions are bound.   So it attempts to use a face
that it knows will be defined in Emacs. 

I'll try to get this fixed & tested by tomorrow night. 


-- 
Jeff Miller
jmiller at cablespeed.com



More information about the XEmacs-Beta mailing list