[Top][All Lists]

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

Icicles, Printing and Easy Menu

From: Herbert Euler
Subject: Icicles, Printing and Easy Menu
Date: Sat, 28 Oct 2006 10:38:42 +0800

This is another problem that arised when I tried Icicles mode (by Drew
Adams -- http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Libraries).

The reason my customizations were cleared (see also
was an init-file loading error.  The error is caused because Icicles
mode confuses `easy-menu-get-map'.

I have Printing settings in my init file.  Precisely, I have the
following lines:

 (if (>= emacs-major-version 22)
     (progn (require 'printing)

I found that when I put `(icicle-mode t)' before this if-clause, I
would get an error, but not if after.  I then traced and knew what was

Printing updates a sub-menu in the "File" menu with `pr-update-menus'.
It does this update with `easy-menu-change'.  `easy-menu-change' will
search for a map in which the modification of menu will be done with

`easy-menu-get-map' requires an argument named `map'.  If this
argument is bound to something not nil, `easy-menu-get-map' will
search for the desired map in it.  Otherwise, it searches in the
result returned by `(current-active-maps)'.  This will be a list of
all of the active maps currently, with the current global map as the
last element.  `easy-menu-get-map' will return the first appropriate
entry, so I think it will return the global map only for the case when
the meaning of caller makes sense to all modes, i.e. not local to the
current major mode.

Printing wants to add a menu entry to the "File" menu, so I think it
wants `global-map'.  But Icicles mode put something in local maps so
that `easy-menu-get-map' returns the local map but not the global map,
so Printing complained, an error was signaled, and customizations was

I wrote to Drew Adams, he suggested me to report this problem to

Should things which may confuse other packages on menu manipulation be
put into `global-map', or `easy-menu-*' be modified?

Guanpeng Xu

Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

reply via email to

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