unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Icicles, Printing and Easy Menu
@ 2006-10-28  2:38 Herbert Euler
  2006-10-28 18:14 ` Richard Stallman
  0 siblings, 1 reply; 8+ messages in thread
From: Herbert Euler @ 2006-10-28  2:38 UTC (permalink / raw)


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
http://lists.gnu.org/archive/html/emacs-devel/2006-10/msg00863.html)
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)
             (pr-update-menus)))

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
wrong.

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'.

`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
cleared.

I wrote to Drew Adams, he suggested me to report this problem to
emacs-devel.

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

Regards,
Guanpeng Xu

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-11-01  5:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-28  2:38 Icicles, Printing and Easy Menu Herbert Euler
2006-10-28 18:14 ` Richard Stallman
2006-10-28 19:45   ` Drew Adams
2006-10-30  7:38   ` Herbert Euler
2006-10-30  7:46     ` Herbert Euler
2006-11-01  2:11       ` Vinicius Jose Latorre
2006-11-01  3:04         ` Herbert Euler
2006-11-01  5:08           ` Vinicius Jose Latorre

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).