[Top][All Lists]

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

RE: On the Printing Problem

From: Drew Adams
Subject: RE: On the Printing Problem
Date: Thu, 2 Nov 2006 13:54:26 -0800

> >From: Vinicius Jose Latorre <address@hidden>
> >For some reason the command:
> >   (easy-menu-change '("file") "Print" pr-menu-spec "print-buffer")
> >has no effect just after step 5.
> >The command above is correct, but has no effect, that is,
> >"Print" submenu is not created.
> >
> >But if after step 5, you do:
> >    5.1 C-h v global-map RET    ;; create *Help* buffer in another window
> >    5.2 C-x o                                 ;; switch to *Help* buffer
> >Now, all works.

Yes, there seems to be a bug there.

> Herber Euler wrote:
> I tried that, the evaluation of (pr-update-menus t) failed again.
> Below is what I wrote to Drew.
> >...
> >Please take a look at (info "(elisp) Remapping Commands").

As I replied to Herbert off list, Icicles does also use command remapping,
where appropriate. There is no equivalent of the OLDMAP arg to
substitute-key-definition for command remapping, and that is what is used
here. Icicles simply creates another keymap that has a particular entry in
the File menu. Whether Icicles adds that menu item to menu File (in the
minor-mode map) using substitute-key-definition or some other way is
irrelevant. This is not a problem with Icicles.

The problem occurs because printing.el runs into that minor-mode map, not
the global-map, when trying to look something up in submenu File > Print. It
should not make any assumptions about which minor-mode and local keymaps
might exist when it tries to look up submenu File > Print. It cannot simply
add the Print submenu to only the global map and then traverse each active
keymap (global-map last) expecting submenu Print to be found under menu File
for each map. It should look only in the keymap(s) where it actually added
submenu Print. If it added Print to the File menu of all existing maps, then
it could look in all existing maps. (I don't claim that it should add Print
to File in all maps; I claim only that it should not look for Print where it
has never placed Print.)

reply via email to

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