unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Brent Goodrick <bgoodr@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 5062@emacsbugs.donarmstrong.com
Subject: bug#5062: 23.1.50; image-toggle-display overwrites nxml-mode  local key map
Date: Sat, 28 Nov 2009 07:26:13 -0800	[thread overview]
Message-ID: <e38bce640911280726p51fc20c4va42d6ff63bebdbac@mail.gmail.com> (raw)
In-Reply-To: <jwvvdgv8jzx.fsf-monnier+emacsbugreports@gnu.org>

On Fri, Nov 27, 2009 at 6:25 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>
> > 2. Run emacs -Q and wait for it to load and map into the display.
> > 3. Type C-x C-f /tmp/test.svg and see that the image of the file is
> > displayed.
> > 4. Type C-c C-c and note that the XML is shown. All correct behavior
> > so far.
> > 5. Type C-h k C-M-n and notice that the key for C-M-n is bound to
> > `forward-list' which is not correct because the .svg file is a xml
>
> Indeed, SVG files should be handled like postscript files, i.e. use
> image-minor-mode rather than image-mode.
> Can someone figure out how to to do that?

Hmmm, seems that image-minor-mode is enabled in this case, with a
major mode of nxml-mode.  But image-minor-mode ultimately calls
image-toggle-display, and image-toggle-display is calling
use-local-map to obliterate whatever map is already there.
image-minor-mode can also call use-local-map, too.  All of that
arrangement seems to be set up by the image-mode-maybe function.

I wonder what the correct "policy" is for a minor mode w.r.t.
keybindings that can shadow a major mode?  Should the major mode's
keymap be the top-most local keymap, with all minor modes as parent
maps of that top-most local keymap? Or is it the other way around,
with each minor mode "pushing" its own local mode map to be top-most,
and causing the current major modes local map to be that parent of
that new one that was "pushed"?

bg





  reply	other threads:[~2009-11-28 15:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <878wdixvgt.fsf@mail.jurta.org>
2009-11-28  0:44 ` bug#5062: 23.1.50; image-toggle-display overwrites nxml-mode local key map Brent Goodrick
2009-11-28  2:25   ` Stefan Monnier
2009-11-28 15:26     ` Brent Goodrick [this message]
2009-11-28 17:49     ` Juri Linkov
2009-11-28 20:21       ` Stefan Monnier
2009-11-28 22:54         ` Juri Linkov
2009-11-29 15:36           ` Stefan Monnier
2009-11-29 16:03             ` Juri Linkov
2009-11-29 18:33               ` Stefan Monnier
2009-11-29 22:00                 ` Lennart Borgman
2009-11-29 22:08                   ` Juri Linkov
2009-11-29 23:16                     ` Lennart Borgman
2009-12-03  0:59                       ` bug#5062: " Juri Linkov
2009-12-03  1:37                         ` Lennart Borgman
2009-12-03  3:08                           ` Kevin Rodgers
2009-12-03  3:31                             ` Lennart Borgman
2009-12-03  3:30                           ` Stefan Monnier
2009-12-03  0:57                 ` bug#5062: 23.1.50; " Juri Linkov
2009-12-03  3:28                   ` Stefan Monnier
2009-12-03  5:00                   ` Jason Rumney
2009-12-04  0:05                     ` Juri Linkov
2009-12-04 22:00   ` bug#5062: marked as done (23.1.50; image-toggle-display overwrites nxml-mode local key map) Emacs bug Tracking System

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e38bce640911280726p51fc20c4va42d6ff63bebdbac@mail.gmail.com \
    --to=bgoodr@gmail.com \
    --cc=5062@emacsbugs.donarmstrong.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).